Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a visual here that contains 3 measures.
Company B and C are okay, sites 1 should far outperform sites 2 in those cases, so I don't need to flag them.
Company A is something I want to flag, sales for site 1 and 2 are too close. It's almost as if the sites made no difference.
Is there a way to do this in a measure? everything else are measures here,
Sales_Measure = SUM(Sales),
by_% is DIVIDE( Sales_Measure, CALCULATE(Sales_Measure , ALLEXCEPT(Table, Company)))
thanks! any help is greatly appreciated!!
Solved! Go to Solution.
Hi, @peterhui50 ;
Try it.
FLAG =
VAR _DIFF=
CALCULATE(MAX('Table'[By_%])-MIN('Table'[By_%]),ALLEXCEPT('Table','Table'[Company]))
RETURN IF (ABS(_DIFF)<0.5,"Flag")
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @peterhui50 ;
Try it.
FLAG =
VAR _DIFF=
CALCULATE(MAX('Table'[By_%])-MIN('Table'[By_%]),ALLEXCEPT('Table','Table'[Company]))
RETURN IF (ABS(_DIFF)<0.5,"Flag")
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could compare the value to a certain threshold with simple IF conditions, e.g.
Flag =
VAR SalesByPct = [by_%]
RETURN
IF (
(
SELECTEDVALUE ( 'Table'[Site] ) = 1
&& SalesByPct <= 0.7
)
|| (
SELECTEDVALUE ( 'Table'[Site] ) = 2
&& SalesByPct >= 0.3
),
"Flag"
)
You could also look into the various conditional formatting options.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |