Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am building a dashboard to get the counts of active employees on a specific date. This has come with quite a few challenges. The original data set has 400K rows. Here is the look of the test data:
First, the user can get the breakdown by 13 different categories in two columns. I had to unpivot the columns for this which created 9 million rows. To get the second dynamic slicer, I had to copy the query and keep just the unpivoted rows and have another table with 9 million rows and have a many to many relationship on the index like below. I had to copy the columns as the user can also use the slicer if they want to only see counts for a specific state.
I have a date text filter with a measure to get the active employees using:
Show or Hide =
VAR SelectedDate = IF(SELECTEDVALUE('As of Date'[Date]) = "Today", TODAY(), DATEVALUE(SELECTEDVALUE('As of Date'[Date])))
RETURN
IF (SelectedDate >= MIN(FirstDate) && SelectedDate <= MAX(LastDate),"Show","Hide")
This is my measure to get the counts of the active employees at that date
Thank you! I appreciate the time.
When you say you have unpivoted a column, which column is it? (Is the table you posted the result after unpivoting or before?)
you should also create a date table with continuous dates covering the range of dates in you model.
can you share some sample (non-condidential) data?
Proud to be a Super User!
Paul on Linkedin.
https://www.dropbox.com/s/rxy2scwedp4zfv0/test%20data.pbix?dl=0
I created this test file that is the overall picture of my dashboard. Let me know if you are unable to download.
Right now, the date measure isn't working, but the logic is at any date, they can see the active count of employees by the detail they choose. In my dashboard, there are 13 columns unpivoted. All of the ones that the user can choose to see the level of detail of.
Thank you!
This is the look of the temp dashboard with drop down slicers. It does not include the date slicer, but that is a crucial piece to my real dashboard.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |