The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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])
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
27 | |
16 | |
15 | |
14 |
User | Count |
---|---|
47 | |
44 | |
41 | |
29 | |
22 |