Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have a fact table called "Due-OnTime".
- The fact table contains Year and quarter wise count of "Due" recods, "Ontime" records, "Country" Column and "Business Area" Column
and I have a Dim table called "Master country"
- The Dim table contains, "Region", "Zone" and "Country"
(Both tables are linked using "Country" Filed)
I calculated the rolling 4 quarters using quarter rank
Last 4 Qtr Due = CALCULATE(sum('Due-OnTime'[# of DUE in the Quater]), FILTER(ALL('Due-OnTime'),'Due-OnTime'[Qtr Rank]>=max('Due-OnTime'[Qtr Rank])-3 && 'Due-OnTime'[Qtr Rank]<=max('Due-OnTime'[Qtr Rank])))
Last 4 Qtr Ontime = CALCULATE(sum('Due-OnTime'[# of Ontime in the Quater]), FILTER(ALL('Due-OnTime'),'Due-OnTime'[Qtr Rank]>=max('Due-OnTime'[Qtr Rank])-3 && 'Due-OnTime'[Qtr Rank]<=max('Due-OnTime'[Qtr Rank])))
New Divide= Last 4 Qtr Ontime/Last 4 Qtr Due
and trying to plot the visual, when i am not taking country column it is working fine.
when I take the "country Name" column from Dim table (Master country) it is working as expected.
but when I take the "country" column from fact table (Due-OnTime), the values are not getting breakdown country wise.
The reason I wnat to take country column from fact table (Due-OnTime) is, I dont have "Business area" column in Dim table (Master country)
as per the requirement i have to use below slicers and slice the data.
Please help me.
Solved! Go to Solution.
Hi @Anonymous ,
This may be due to the filtering direction of the table relationship. Try to create a measure and apply it to the visual levle filter.
measure = if(max('dim'[country]) in values('fact'[country]),1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
This may be due to the filtering direction of the table relationship. Try to create a measure and apply it to the visual levle filter.
measure = if(max('dim'[country]) in values('fact'[country]),1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , This case for better result, You need to have Qtr, year, Qtr Year and Rank all in a separate table
I called it Date, but is can any table, but not part fact table
This Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0
Hi @amitchandak , When I am using separate dim table for year quarter I'm getting unwanted records
Ex- in my fact table I have data for 5 Quarters (2020-Q1 to 2021-Q1), but when I'm relateing the fact and dim table using year-qtr column and ploting the visual, I'm getting unwated quarters which i dont have in fact table. ex:- 2021-Q2, 2021-Q3 and 2021-Q4
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
122 | |
101 | |
71 | |
61 |