Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have a list of persons who are assigned to sites.
For each day, i want to see what persons were onsite and what persons were not.
I need to be able to do this while still filtering by site. i.e. i only see persons for the selected site.
The issue i have is if i create a measure to count a users records, users with no records will not be present.
If i wrap that measure in an IF, so it assigns 0 if there is no record, i see all persons for all sites, not a problem here, but in my real dataset with thousands of persons, it is a big issue.
How can i see all persons for the select site, and if they were present on a paritcular day or not?
Below is a screenshot of sample data and desired result if i had selected site A, and a link to a pbix containing this sample data. Appretiate any expertise provided.
https://1drv.ms/u/s!AgldA0VQfPV9hNtsompxszevR8TRTA?e=viRG1j
Solved! Go to Solution.
You could use this measure as below:
Records =
IF(CALCULATE(MAX('Fact'[personid]))<>BLANK()&&MAX(DimPerson[assigned site]) in VALUES(DimSite[siteID]),1,IF(MAX(DimPerson[assigned site]) in VALUES(DimSite[siteID]),0))
Result:
here is sample pbix file, please try it.
Regards,
Lin
I have changed the relationships and get the following result with your attached pbix file (see below):
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
thanks. thats a help, and its helped me refine my question!
This shows persons with no records, but if i select a date, i only see people on that date. On any given day, i need to see the people who were onsite and the people who were not. An indicator measure would work, i.e. 1 if they were onsite, 0 if they were not.
Will play with and build on the idea you provided.
Thanks!
You could use this measure as below:
Records =
IF(CALCULATE(MAX('Fact'[personid]))<>BLANK()&&MAX(DimPerson[assigned site]) in VALUES(DimSite[siteID]),1,IF(MAX(DimPerson[assigned site]) in VALUES(DimSite[siteID]),0))
Result:
here is sample pbix file, please try it.
Regards,
Lin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
69 | |
66 | |
50 | |
32 |
User | Count |
---|---|
116 | |
99 | |
75 | |
65 | |
40 |