The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
HI
In below table, I need to return 3rd row "GM" Company with "1" in [IF 80%] measure.
I write DAX as.... [IF 80 %] = IF([**bleep**. % of Total] <0.8,1,0)
Solved! Go to Solution.
Hi @vijay273162 ,
Try to create a measure like below:
IF 80% =
VAR MIN_ = MINX(ALL('Table'),ABS('Table'[cum %of total]-0.8))
VAR VALUE_ = CALCULATE('Table'[cum %of total],FILTER(ALL('Table'),ABS('Table'[cum %of total]-0.8)=MIN_))
RETURN IF([cum %of total]<=VALUE_,1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IF 80% = VAR _rx=[Rank] RETURN IF(CALCULATE([**bleep**. % of Total],FILTER(ALL(Table[Company]),[Rank]<_rx))<0.8,1,0)
HI @vijay273162
Do you want to change the condition or just add an exception for GM?
To change the condition:
[IF 80 %] = IF([**bleep**. % of Total] <0.84,1,0)
to add an exception :
[IF 80 %] = IF(Max(Company])="GM",1,[**bleep**. % of Total] <0.84,1,0))
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Thanks for reply.
If I apply filter, with IF condition, it return top 2 rows.
This will give me [% of total] row total as 61.11%. (only volvo & ford).
I need to get close to 80% or more as row total, (next row "GM" to get row total as 83.33 %.)
Hi @vijay273162 ,
Try to create a measure like below:
IF 80% =
VAR MIN_ = MINX(ALL('Table'),ABS('Table'[cum %of total]-0.8))
VAR VALUE_ = CALCULATE('Table'[cum %of total],FILTER(ALL('Table'),ABS('Table'[cum %of total]-0.8)=MIN_))
RETURN IF([cum %of total]<=VALUE_,1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |