The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
The measures are then grouped together using the Field Parameter function giving me a filter like the one below:
Now I am trying to write a new measure that allows me to switch based on the selected value in the filter. Is it possible to write something like this?
Kind of new to Power Bi and DAX... so could be easy... 🙂 Please help!
Best regards
Stefan
Solved! Go to Solution.
Hi @Oggie - Ensure that you have a base measure has been created,
create one more new measure as follows with selectedvalue func and add it to your card visual.
KPI Net Revenue Act =
VAR SelectedKPI = SELECTEDVALUE('KPI Comparison Net Rev'[KPI Comparison Net Rev])
RETURN
IF(
SelectedKPI = "MTD vs Budget",
FORMAT([Net Revenue Act MTD] / 1000, "# ###"),
FORMAT([Net Revenue Act YTD] / 1000, "# ###")
)
try above and let know
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
I managed to solve it with your help, but I had to change the Selected value from "the composite key" to the actual field key, ie the code ended up like the following:
Hi @Oggie - Ensure that you have a base measure has been created,
create one more new measure as follows with selectedvalue func and add it to your card visual.
KPI Net Revenue Act =
VAR SelectedKPI = SELECTEDVALUE('KPI Comparison Net Rev'[KPI Comparison Net Rev])
RETURN
IF(
SelectedKPI = "MTD vs Budget",
FORMAT([Net Revenue Act MTD] / 1000, "# ###"),
FORMAT([Net Revenue Act YTD] / 1000, "# ###")
)
try above and let know
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
I managed to solve it with your help, but I had to change the Selected value from "the composite key" to the actual field key, ie the code ended up like the following:
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
246 | |
119 | |
114 | |
86 | |
70 |