Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have order numbers, sub order numbers, planned time and actual time for each sub order. 1 order having multiple sub orders. I want to find count of orders where, summation of actual time is greater than summation of planned time. There are thousands of entries for orders.
In other words, I want pivot table of my data and then using that result i want to plot graphs. I want to do it using Dax.
Solved! Go to Solution.
Hi @Rajeshree ,
You can use "SUM" function in Dax to calculate summation of planned time/ actual time. I create a sample to have a test.
Measure:
Count of Orders Sum of Actual time > Sum of Planned time =
VAR _T =
SUMMARIZE (
'Table',
'Table'[Order numbers],
"Planned time Duration", CALCULATE ( SUM ( 'Table'[Planned time] ) ),
"Actual time Duration", CALCULATE ( SUM ( 'Table'[Actual time] ) )
)
RETURN
COUNTAX (
FILTER ( _T, [Actual time Duration] > [Planned time Duration] ),
[Order numbers]
)
In my sample, only "Order 2" 's summation of actual time is greater than summation of planned time. So measure should return 1. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Rajeshree ,
You can use "SUM" function in Dax to calculate summation of planned time/ actual time. I create a sample to have a test.
Measure:
Count of Orders Sum of Actual time > Sum of Planned time =
VAR _T =
SUMMARIZE (
'Table',
'Table'[Order numbers],
"Planned time Duration", CALCULATE ( SUM ( 'Table'[Planned time] ) ),
"Actual time Duration", CALCULATE ( SUM ( 'Table'[Actual time] ) )
)
RETURN
COUNTAX (
FILTER ( _T, [Actual time Duration] > [Planned time Duration] ),
[Order numbers]
)
In my sample, only "Order 2" 's summation of actual time is greater than summation of planned time. So measure should return 1. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Rajeshree , Not very clear. In the visual like bar, you can explore small multiple
or I matrix you try add trend line (sparklines) etc -https://community.powerbi.com/t5/Quick-Measures-Gallery/SVG-Sparklines-Line/td-p/486271
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
185 | |
73 | |
73 | |
50 | |
42 |