Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Solved! Go to Solution.
Hello - You were really close. The measure below works for me. Basically, you should create a separate measure for LastYearPriceIndex with the basic logic of calculating the amount for the prior year (excluding the blank evaluation). Then create another measure which is the one that goes in the visual (example below). You will need to update the table and column name in the SelectedCity variable and also update measure name in the SelectedCalculation variable.
Last Year Price Index for Display =
VAR SelectedCity = SELECTEDVALUE( DimTableName[CityColumnName],blank() )
VAR SelectedCalculation = [YourMeasureName]
VAR Result = if ( SelectedCity = blank(), blank(), SelectedCalculation )
RETURN
Result
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
@jennratten That worked like magic 🙂 Quick Question: is there a way that instead of displaying the word (Blank) to keep it with no words just nothing shows up. Curious to know if we can apply something to the dax to make it show nothing in terms of wording or maybe a dash (-)
There are a couple of things you can do.
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
You are very welcome!!
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
Hello - You were really close. The measure below works for me. Basically, you should create a separate measure for LastYearPriceIndex with the basic logic of calculating the amount for the prior year (excluding the blank evaluation). Then create another measure which is the one that goes in the visual (example below). You will need to update the table and column name in the SelectedCity variable and also update measure name in the SelectedCalculation variable.
Last Year Price Index for Display =
VAR SelectedCity = SELECTEDVALUE( DimTableName[CityColumnName],blank() )
VAR SelectedCalculation = [YourMeasureName]
VAR Result = if ( SelectedCity = blank(), blank(), SelectedCalculation )
RETURN
Result
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
User | Count |
---|---|
30 | |
25 | |
24 | |
13 | |
9 |
User | Count |
---|---|
24 | |
19 | |
16 | |
13 | |
9 |