March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I have data like this
I need a graph like this
Please help. I have to show average of TAT days by stage name along the time axis .
Days at stage in the 2nd graph = TAT days in the data table
stage in the 2nd graph = stg_nm in the table
TAT days is calculated from fact
Stg_nm, - comes from dimension(which has dim_proj_stg_key) which is connected to dim_proj_stg_key in fact
Solved! Go to Solution.
Hi @KV2022 ,
This is my test fact table:
Dim table:
Create two measures:
TAT =
CALCULATE (
DATEDIFF ( MIN ( [Date] ), MAX ( [Date] ), DAY ),
FILTER (
'Fact',
'Fact'[dim_proj_stg_key] = SELECTEDVALUE ( 'Fact'[dim_proj_stg_key] )
&& 'Fact'[YearMonth] = SELECTEDVALUE ( 'Fact'[YearMonth] )
)
)
Average_TAT =
AVERAGEX (
FILTER (
ALL ( 'Fact'[YearMonth] ),
'Fact'[YearMonth] = SELECTEDVALUE ( 'Fact'[YearMonth] )
),
[TAT]
)
I think this is the result you want:
If I misunderstand your demands, please share with me some screenshots of your data after hiding sensitive information and tell me what's your expected output.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KV2022 ,
This is my test fact table:
Dim table:
Create two measures:
TAT =
CALCULATE (
DATEDIFF ( MIN ( [Date] ), MAX ( [Date] ), DAY ),
FILTER (
'Fact',
'Fact'[dim_proj_stg_key] = SELECTEDVALUE ( 'Fact'[dim_proj_stg_key] )
&& 'Fact'[YearMonth] = SELECTEDVALUE ( 'Fact'[YearMonth] )
)
)
Average_TAT =
AVERAGEX (
FILTER (
ALL ( 'Fact'[YearMonth] ),
'Fact'[YearMonth] = SELECTEDVALUE ( 'Fact'[YearMonth] )
),
[TAT]
)
I think this is the result you want:
If I misunderstand your demands, please share with me some screenshots of your data after hiding sensitive information and tell me what's your expected output.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for the reply. I am getting result like this.
The TAT and Average TAT are same for every stage.
In the data model, the stage names can be duplicate in fact meaning the stages can have iterations for every month.
The last 2 columns in this picture below are minimum iteration and max iteration for a stage in a month. for eg; in Oct 2017, publisher check stage has 2 iteration. So the average should be 8 TAT days average to 4 days for 2 iterations in the stage.
But Average TAT is same as TAT . Is this correct?
Thanks.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |