Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,
I have a scenarios where I need to create 2 measures with some logic and basedon the 2 measure i need to create a new column or measure based on a condition.
2 measures Created
Measure 1 : SUMX(Purch,(Purch[Inovice-Amt] * RELATED(Currency_Conv[Curr_Conv])))
Can you share some sample data?
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Hi @stevedep ,
Thanks for the response. Below is the sample data
PID | P_Desc | Purch_group | Measure 1 | Measure 2 | Measure 3 |
901157156 | Abcd | 21 | 634.56 | 32 | 32 |
911147167 | nesad | 34 | 54.7 | 4 | 4 |
813143561 | qwe | 20 | -10758 | 329 | 329 |
But I need to get as below where i am unable to add condition in Measure 3 to get as below output. For measure 3 third row I need to get 0 but getting 329.
PID | P_Desc | Purch_group | Measure 1 | Measure 2 | Measure 3 |
901157156 | Abcd | 21 | 634.56 | 32 | 32 |
911147167 | nesad | 34 | 54.7 | 4 | 4 |
813143561 | qwe | 20 | -10758 | 329 | 0 |
Thanks in advance.
@Anonymous ,
Try a measure like
Sumx(values(Table[PID]), If([Measure 1] < 0 && [Measure ] > 0 ,0 , [Measure 2]))
or
Sumx(Summarize(Table[PID],"_1", If([Measure 1] < 0 && [Measure ] > 0 ,0 , [Measure 2])),[_1])
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |