Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi, as a beginner in DAX I need some help for something which looks quite simple (and probably it is), but I don't know the solution.
I do have a table with standard time in minutes per service and another table with the quantity per service.
Now I want to calculate the total time in hours per service (190, 91, 232) as well as a total time (513 minutes).
Anyone?
Solved! Go to Solution.
Hi @jdevalk77 ,
Please try below steps:
1. create measure with below dax formula
Measure =
VAR cur_service =
SELECTEDVALUE ( Table1[Service] )
VAR cur_mt =
CALCULATE ( MAX ( Table1[Minutes] ), Table1[Service] = cur_service )
VAR tmp =
FILTER ( ALL ( Table2 ), Table2[Service] = cur_service )
VAR _val =
SUMX ( tmp, [Quantity] )
RETURN
cur_mt * _val
Measure 2 = SUMX(VALUES(Table1[Service]),[Measure])
2. add a table visual with field and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @jdevalk77 ,
Please try below steps:
1. create measure with below dax formula
Measure =
VAR cur_service =
SELECTEDVALUE ( Table1[Service] )
VAR cur_mt =
CALCULATE ( MAX ( Table1[Minutes] ), Table1[Service] = cur_service )
VAR tmp =
FILTER ( ALL ( Table2 ), Table2[Service] = cur_service )
VAR _val =
SUMX ( tmp, [Quantity] )
RETURN
cur_mt * _val
Measure 2 = SUMX(VALUES(Table1[Service]),[Measure])
2. add a table visual with field and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
76 | |
57 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
56 | |
46 | |
40 |