Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 !!
Proud to be a Super User! | |
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 !!
Proud to be a Super User! | |
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:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |