Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
In my report, I have Inspectors who are conducting inspections. I calculate the number of inspections made by the Inspectors just by using COUNTROWS and week filters and it is working great, but I would like to add the comparison of the number of inspections from this week and the previous week.
So basically, if I have week 29 now and one of my inspectors made 15 inspections this week, I would like to make a KPI comparison between his week 29 score and week 28, when he did 13 inspections.
Any ideas on how to do this? Screens attached.
Regards,
Solved! Go to Solution.
Hi @pal95 ,
You will need to create two tables, one for week of year and one for inspector name. Make sure there's no relationship between fact table and these two table then use these tables as slicers.
Create measures as below.
current_week = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[weeknum]=SELECTEDVALUE('weeknum'[weeknum])&&'Table'[name]=SELECTEDVALUE('name'[name])))
previous_week = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[weeknum]=SELECTEDVALUE('weeknum'[weeknum])-1&&'Table'[name]=SELECTEDVALUE('name'[name])))
Sample data for your reference.
Best Regards,
Jay
Hi @pal95 ,
You will need to create two tables, one for week of year and one for inspector name. Make sure there's no relationship between fact table and these two table then use these tables as slicers.
Create measures as below.
current_week = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[weeknum]=SELECTEDVALUE('weeknum'[weeknum])&&'Table'[name]=SELECTEDVALUE('name'[name])))
previous_week = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[weeknum]=SELECTEDVALUE('weeknum'[weeknum])-1&&'Table'[name]=SELECTEDVALUE('name'[name])))
Sample data for your reference.
Best Regards,
Jay
It works, but only to this particular indicator. How to make other visuals on the same to 'listen' to the filters?
I modify this a bit and it works
@pal95 , see if my blog can help
User | Count |
---|---|
93 | |
83 | |
77 | |
70 | |
65 |
User | Count |
---|---|
114 | |
101 | |
96 | |
65 | |
60 |