Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All,
My table
User | deprt | total min | days | users | orders |
aaa | sjb 4 | 93 | 5 | 25 | 20 |
aaa | sjb 4 | 2 | 5 | 25 | 20 |
aaa | sjb 4 | 0.4 | 5 | 25 | 20 |
now I must do a sum of total min and see if it is grater then 6*days, if it is grater then it is true else false.
so, for above data sum of total min = 95.4
6*days will be 6*5 = 30
so, my values need to be true
but I am unable to replicate same in power bi when i using a measure i was able to take the sum (total min) but unable to get the 6*days expression.
I don’t need sum of days, just sum of total min > 6* days.
how can I do it?
Solved! Go to Solution.
Hi, @prasala
You can refer to @Syk latest reply, if it does not work, you can refer to the following DAX.
DAX:
True or False =
VAR _max_TotalMin =
CALCULATE ( MAX ( 'Table'[total min] ), ALLEXCEPT ( 'Table', 'Table'[User] ) )
VAR _result =
IF ( _max_TotalMin > SELECTEDVALUE ( 'Table'[days] ) * 0.6, "true", "false" )
RETURN
_result
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @prasala
You can refer to @Syk latest reply, if it does not work, you can refer to the following DAX.
DAX:
True or False =
VAR _max_TotalMin =
CALCULATE ( MAX ( 'Table'[total min] ), ALLEXCEPT ( 'Table', 'Table'[User] ) )
VAR _result =
IF ( _max_TotalMin > SELECTEDVALUE ( 'Table'[days] ) * 0.6, "true", "false" )
RETURN
_result
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Not exactly what my requirement is
For the person aaa I need a single value if it is true or false
So I need sum(total min) > 6* (days)
if it true then i need true for the user aaa not per row it should be per user
Try this
User Check = var totalmin = SUM('Table'[total min])
var sixxdays = AVERAGE('Table'[days])*6
RETURN if (totalmin > sixxdays,TRUE(),FALSE())
Add a custom column and use this logic
if [total min] > 6*[days] then "True" else "False"
User | Count |
---|---|
83 | |
69 | |
68 | |
65 | |
53 |
User | Count |
---|---|
94 | |
92 | |
91 | |
77 | |
70 |