The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I have two visuals, both coming from the same table, the "Value" is a measure. The visuals are differently filtered based on the "Reporting category".
Now, I wish to compare "value" of account no "1000610" from visual 1 to the "value" of account no "200610" + "value" of account no "200830" from visual 2.
And based on the comparision, I wish to find which value is bigger and show the difference on either of the visual where the value was bigger.
consequently "100610" in visual 1 , "200610" and "200830" in visual 2 should not show up. Only the difference should show as "ABC" under either "OTHERASSETS" or "LIABLITIES", based on which had the bigger value.
I hope I am able to explain my issue.
@Greg_Deckler @lbendlin @amitchandak
Solved! Go to Solution.
Hi @Anonymous ,
Here I create a sample to have a test.
Measure:
Diff =
VAR _VISUAL1 =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Table' ),
'Table'[Reporting Category] = "OTHERASSETS"
&& 'Table'[Level2] = 100610
)
)
VAR _VISUAL2 =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Table' ),
'Table'[Reporting Category] = "LIABILITIES"
&& 'Table'[Level2] IN { 200610, 200830 }
)
)
RETURN
_VISUAL1 - _VISUAL2
Card =
SWITCH (
TRUE (),
[Diff] < 0, "Visual 2 200610 and 200830 bigger",
[Diff] > 0, "Visual 1 100610 bigger",
"Two visual the same"
)
Value without 100610/200610/200830 =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', NOT ( 'Table'[Level2] IN { 100610, 200610, 200830 } ) )
)
I suggest you to show the result of comparsion in card visual.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Here I create a sample to have a test.
Measure:
Diff =
VAR _VISUAL1 =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Table' ),
'Table'[Reporting Category] = "OTHERASSETS"
&& 'Table'[Level2] = 100610
)
)
VAR _VISUAL2 =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Table' ),
'Table'[Reporting Category] = "LIABILITIES"
&& 'Table'[Level2] IN { 200610, 200830 }
)
)
RETURN
_VISUAL1 - _VISUAL2
Card =
SWITCH (
TRUE (),
[Diff] < 0, "Visual 2 200610 and 200830 bigger",
[Diff] > 0, "Visual 1 100610 bigger",
"Two visual the same"
)
Value without 100610/200610/200830 =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', NOT ( 'Table'[Level2] IN { 100610, 200610, 200830 } ) )
)
I suggest you to show the result of comparsion in card visual.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.