Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |