Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
dylancc96
Frequent Visitor

All Values Are Exactly One Higher Than Expected On Visual

Good Evening,

 

I am stumped on this one. I have created a custom column to get the data I need, and filter that which I do not. 

 

My Column is as Follows - 

 

 

Last PayDate Month = If(EOMONTH(ADPAllSiteWages[PayDate],0) - ADPAllSiteWages[PayDate] < 7, (ADPAllSiteWages[PositionID]))

 

 

 [Paydate] - Date

[PositionID] - Text (Count Distinct is being used on the visual)

 

The purpose of this column is to count the employees on the last paydate (Friday) of each month. In the table view, this seems to perform as expected. However, when I add this column to my visual, each row is exactly one higher than it should be, and the subtotal does not accurately reflect the amounts being shown. 

 dylancc96_0-1682396161872.png

The correct subtotal should be 306 (Verified with external data) and even with the data shown, the correct subtotal would be 314.

 
Has anyone encountered this issue before? From what I can tell, the relationships do not seem to be out of line ( I will re-review in the morning once I've had some sleep.) and I dont see what could cause this from the column formula.
 
Thank you for reviewing, any help or suggestions on this would be greatly appreciated.
 
Best,
Dylan
1 ACCEPTED SOLUTION
dylancc96
Frequent Visitor

Found the Solution after a good nights sleep. Issue was that Count Distinct includes non blank values. For some reason, filtering non blank values at the visual level was not doing anything.

 

To remedy, I made a measure to distinct count the column I made above, excluding the blanks with the Function DISTINCTCOUNTNOBLANK.

 

 

Employee Count (Distinct) = Distinctcountnoblank('ADPAllSiteWages'[Last Paydate Month])

 

 

Additional Material -  YT Video on Exclude Blank Records 

How Count Distinct Aggregates (See Answer) 

Hope this helps someone down the road!

View solution in original post

1 REPLY 1
dylancc96
Frequent Visitor

Found the Solution after a good nights sleep. Issue was that Count Distinct includes non blank values. For some reason, filtering non blank values at the visual level was not doing anything.

 

To remedy, I made a measure to distinct count the column I made above, excluding the blanks with the Function DISTINCTCOUNTNOBLANK.

 

 

Employee Count (Distinct) = Distinctcountnoblank('ADPAllSiteWages'[Last Paydate Month])

 

 

Additional Material -  YT Video on Exclude Blank Records 

How Count Distinct Aggregates (See Answer) 

Hope this helps someone down the road!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.