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.
Hello,
I am working on a Power BI dashboard with lots of conditional values to be shown. In the process I found a obsrtuction and need help to overcome that. I have created one measure as follows:
Solved! Go to Solution.
Cretae a measure
QTY Need 2 = IF ( HASONEVALUE ( 'Table'[partnumber] ), IF ( [QTY Need v1] < 0, 0, [QTY Need v1] ), SUMX ( ALL ( 'Table'[partnumber] ), [QTY Need] ) )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Create a measure
QTY Need = IF ( HASONEVALUE ( 'Table'[partnumber] ), IF ( [QTY Need v1] < 0, 0, [QTY Need v1] ), SUMX ( ALL ( 'Table'[partnumber] ), [QTY Need v1] ) )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Thanks for the reply, but the total is in negetive figure. I want the total should be showing the sum of positive values only.
As per the logic - the values of "QTY Need" are either 0 (negetive values will be shown as 0) or positive values. I want the sum of those positive values only.
Regards
Utsav
Cretae a measure
QTY Need 2 = IF ( HASONEVALUE ( 'Table'[partnumber] ), IF ( [QTY Need v1] < 0, 0, [QTY Need v1] ), SUMX ( ALL ( 'Table'[partnumber] ), [QTY Need] ) )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hii @utsavlexmark,
QTY Need v1 = CALCULATE('analytics nabsi'[Demand]-'analytics nabsi'[Total AVAIL INVENTORY])
For the above calculation,
Are you using per row calculation? If yes, then you need to create a calculated column in table:
QTY Need v1= 'analytics nabsi'[Demand]-'analytics nabsi'[Total AVAIL INVENTORY]
Then you can create a measure:
QTY Need = IF(sum([QTY Need v1])<0,0,sum([QTY Need v1]))
If this doesn't work then can you please share sample data, so I can help you.
If it helps, then please mark it as Accept as Solution
Thanks,
mohittimpus
Hello,
This is not working; you are right that the calculation I am using per row calculation – but few things I forgot to mention:
'analytics nabsi'[Demand] and analytics nabsi'[Total AVAIL INVENTORY] both are Measures.
Demand = SUMX('analytics nabsi','analytics nabsi'[AWS]*4+'analytics nabsi'[backordered])
analytics nabsi'[AWS]=Measure
analytics nabsi'[backordered]=General Column
Total AVAIL INVENTORY = SUM('analytics nabsi'[availableinventory])
analytics nabsi'[availableinventory]=General Column
The sample data is
Please let me know if you need any more information.
I hope that I didn’t made the things complicated.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |