PowerBI-tips / TabularEditor-Scripts

Scripts for Tabular Editor 2 & 3. Community driven to make your Tabular Editor experience as fast as possible.
MIT License
164 stars 72 forks source link

Update Create Drill Through Help Text.csx #6

Closed ArturNawrocki closed 3 years ago

ArturNawrocki commented 3 years ago

The formula generated is : IF(SELECTEDVALUE('FACT-Production KPI'[DimensionUnit]),0 == 0, "Click a Company to See Details - so it needs to change the way quotation marks are set

First: there is too many arguments in IF function - so it resulted in error in DAX expression Second: There was the problem with quotation marks - needed was to add additonal "\" Third: Selectedvalue wasn't necessary - HASONEVALUE is little bit faster and code is cleaner

ArturNawrocki commented 3 years ago

Well I have left - one comment line too much... And I don't how to re-edit it... Still learning this Github thing

MikeCarlo commented 3 years ago

Great fixes, Thanks for cleaning this one up!