The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Apologies for posting this so soon after a previous post, but hoping this can be cleared up quickly.
I have a card visual that counts the total in a table. However, this total has filters applied to it using slicers. I'd like a measure that gets the exact value shown in this card visual without entering all the slicer filters inside the DAX expression again. Is this possible?
Thanks!
Solved! Go to Solution.
Hi @mmh9119 ,
Please try the following methods and check if they can solve your problem:
1.Create the simple tables.
2.Create the new measure to calculate. Drag the measure into the Visual A.
3.Select Broken Nation and CIC in the slicer.
4.Select Edit interactions in the format pane.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the replies. I will try and be more clear.
I have the following:
Visual A is a card visual containing a measure for the percentage of values for a specific value type (AgeUnder12) in a table. The measure has the following DAX:
_Perc_AgeUndr12 =
DIVIDE (
CALCULATE (
COUNTROWS ( Table1 ),
FILTER ( ALLSELECTED ( Table1 ), Table1[AgeUnder12] = "Y" )
),
COUNT ( Table1[PersonId] ),
1 //0 -- Add a default value for divide to handle potential division by zero
)
On the bottom are two filters. If any item in either of the two filters are selected, the value in Visual A changes accordingly. What I want is that after I have set the two filters ("Brokenhead Ojibway Nation" and "CIC"), I want a different measure (call it "_Visual_A_Measure") to directly get the resulting total count in visual A.
Something like:
_Visual_A_Measure = GETVALUE(Visual A i.e. the value in the card visual)
@v-jiewu-msft I can't use the sum method because that's not how the value is being calculated unfortunately. Alternatively, if the above is not doable, I'm wondering if you could help me with applying the filters into the DAX expression instead. I have the following:
_REP_Global_UnderAge12_Perc =
DIVIDE (
CALCULATE (
COUNTROWS ( Table1 ),
FILTER ( ALL( Table1 ), Table1[AgeUnder12] = "Y" ),
FILTER(ALL(Table1), Table1[FirstNationName] = "Brokenhead Ojibway Nation"),
FILTER(ALL(Table1), Table1[CaseCat] = "CIC")
),
COUNT ( Table1[PersonId] ),
1 //0 -- Add a default value for divide to handle potential division by zero
)
However, this gives me a value of 0.01 instead of 0.58 like in the card visual A. I don't see what the issue might be?
Thanks!
Hi @mmh9119 ,
Please try the following methods and check if they can solve your problem:
1.Create the simple tables.
2.Create the new measure to calculate. Drag the measure into the Visual A.
3.Select Broken Nation and CIC in the slicer.
4.Select Edit interactions in the format pane.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mmh9119 ,
Please try the following methods and check if they can solve your problem:
1.Create the simple table.
2.Select the slicer visual and drag the name into the slicer.
3.Create a new measure to calculate total. Enter the following DAX formula.
Total = SUM('Table'[Margin])
4.Select the new card visual. Drag the measure to the visual.
5.In the Format pane, select Edit interaction. Click on the None.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @mmh9119
sorry, but i ddint really get what you want.
can you please share a presentation of the output you want to achieve ?
best regards
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 August 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
83 | |
73 | |
51 | |
42 |
User | Count |
---|---|
140 | |
112 | |
72 | |
64 | |
63 |