March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
28 | |
21 | |
20 | |
13 | |
10 |