Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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
@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.
You are very welcome!!
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
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!