Hi all.
I have a slicer with 3 selection options for "Std Matter".
Just to show my issue, I have created 3 separate cards to show a value for each option.
But what I want if possible, is only one card to show the relevant value, based on the slicer selection.
I am also not sure if I have done this correctly, but the 3 values are just a fixed "expected value". I added 3 measures:
where for example:
Solved! Go to Solution.
Hi @christinek,
So you mean return specific value based on current selection? If that is the case, you can use SWITCH and SELECTEDVALUE function as following measure formula:
formula =
VAR selected =
SELECTEDVALUE ( Table[Column] )
RETURN
SWITCH (
selected,
"Business Compliance 2022", 1125,
"Individual Returns 2022", 1947,
"Super Fund Taxation & Accounts", 479,
0
)
You can use this in the card visual and it will return static values based on current selections.(notice: these can only achieve in measure formula because power bi does not support create dynamic calculate column/table based on filter selections)
Regards,
Xiaoxin Sheng
Hi @christinek,
If you mean add up three formula results, I’d like to suggest you create a new measure invoke and calculate with these formulas.
In addition, you can also take a look at the following link about use switch to redirect to different calculation based on current selections:
Regards,
Xiaoxin Sheng
Hi, thank you for suggestion and detail. I don't actually want a SUM.
What I want to appear in the CARD is
if slicer selection = Business Compliance 2022, CARD to show 1125 (fixed value)
if slicer selection = Individual Returns 2022, CARD to show 1947 (fixed value)
if slicer selection = Super Fund Taxation & Accounts, CARD to show 479 (fixed value).
I have tried to use your suggestion, but not getting the reult I am after. This is what I have done:
where:
I hope this is clearer.
Shuold I still be able to use your suggestion and if so, where have I gone wrong in above please?
Apprectiate your time.
Hi @christinek,
So you mean return specific value based on current selection? If that is the case, you can use SWITCH and SELECTEDVALUE function as following measure formula:
formula =
VAR selected =
SELECTEDVALUE ( Table[Column] )
RETURN
SWITCH (
selected,
"Business Compliance 2022", 1125,
"Individual Returns 2022", 1947,
"Super Fund Taxation & Accounts", 479,
0
)
You can use this in the card visual and it will return static values based on current selections.(notice: these can only achieve in measure formula because power bi does not support create dynamic calculate column/table based on filter selections)
Regards,
Xiaoxin Sheng
Yes, works perfectly. Thank you so much Xiaoxin.
User | Count |
---|---|
130 | |
58 | |
55 | |
54 | |
47 |
User | Count |
---|---|
125 | |
74 | |
54 | |
52 | |
50 |