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 have some measure creating experience but am slightly stumped because my data is in two different tables
Here are my two tables
PGID Table
PGID Cat, Time Type
Vacation, Non-working
Business Development, Working
Bereavement, Non-working
AX Table
PGID Cat, Hours
Bereavement, 10
Vacation, 5
Vacation, 2
Business Development, 15
I would like to create a measure for Working Hours = sum of hours if PGID Cat Table time type is "working".
Does that make sense? I will also make one for non-working hours too of course 🙂
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can do some steps as follows.
_sum=sumx(‘AX’,[Hours])
Result:
Working = IF(
MIN('PGID'[ Time Type])="Working",
SUMX(AX,'AX'[ Hours]))
Non_working = IF(MAX('PGID'[ Time Type])="Non-working",SUM('AX'[ Hours]))
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you can do some steps as follows.
_sum=sumx(‘AX’,[Hours])
Result:
Working = IF(
MIN('PGID'[ Time Type])="Working",
SUMX(AX,'AX'[ Hours]))
Non_working = IF(MAX('PGID'[ Time Type])="Non-working",SUM('AX'[ Hours]))
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous,
Try these measures. A relationship between the tables is required.
Working Hours =
CALCULATE ( SUM ( 'AX Table'[Hours] ), 'PGID Table'[Time Type] = "Working" )
Non-working Hours =
CALCULATE ( SUM ( 'AX Table'[Hours] ), 'PGID Table'[Time Type] = "Non-working" )
Proud to be a Super User!
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 |
---|---|
112 | |
97 | |
85 | |
68 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |