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

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.

Reply
henriley
Regular Visitor

Card is Not Accurately Counting Distinct Rows

Hello, I'm realtively new to PowerBI and am struggling to understand some nuances of the platform. This is the view of the current iteration of my dashboard:

 

henriley_0-1630334294260.png

The highlighted slicer is used to filter the cards in the top right based off various feature values. For example, if I set the slider to be 0-100 for Feature 1, the only surveys that would be counted are the surveys that had a value that lands in that range.

 

I create an index in each row to mark each unique survey instance. The # of Surveys card is counting the number of unique indices in a table using this measure:

 

# of Surveys = DISTINCTCOUNT('Fact Features'[Index])
 
When I set the value slider to be between -150,000 and -9000, I would expect the # of Surveys card to read 9, not 10, based off the data view set to have the same filters (<=-9000 for the feature value and the feature name set to Feature 1):
henriley_1-1630334604294.png

 

What it seems like is the card is double counting the indices if a specific Business Partner has two different surveys with a number that falls within the range and a number that falls out of the range. It will automatically count both even if both numbers don't fall in the range. The table below is in the report view with Feature 1's value set to be <=-9000:

 

henriley_2-1630334994076.png

 

We can see that riley is being counted twice even though he only has one value in the range.

 

Any help would be appreciated on how to get the accurate counts.

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

please share some sample data or PBIX file using OneDrive, Dropbox or similar, and a depiction of the expected outcome. Thanks!





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






This is the raw data that is filtered/counted in the cards:

 

henriley_0-1630339163427.png

Thanks, but we need data, not an image, to be able to work on!





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks PaulDBrown, my company does not allow me to post a link that allows direct access to the PBIX/Raw data. The best I can do is posting tables here.

 

Dim Geography

bpartner_idpremise_idlatitude_derivedlongitude_derivedmove_in_datemove_out_datecity_bparpostalcode
bob142.59364-83.07481900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000traverse city49684
lori242.60364-83.14481900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000sterling heights48310
maggie342.44364-83.22481900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000troy49459
riley442.59364-83.07481900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000sterling heights48310
erin542.35364-83.01881900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000farmington48334
debra642.47161-83.50621900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000novi48374
sharon742.70364-83.35481900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000port huron48060
pete842.42364-83.51481900-01-01T00:00:00.000+00009999-12-31T00:00:00.000+0000birmingham48009

 

Fact Features/Feature Selector (1)

nps_bpartner_idsurvey_nps_rawnps_classificationsurvey_dateWater_OnlyHeat_OnlyCombois_happyis_adultfeature_1feature_2feature_3
riley8passive2018-02-19T20:15:06.000+0000100FALSETRUE-1060050100
erin10promoter2018-03-03T15:48:22.000+0000010FALSETRUE-15000025110
riley8passive2019-04-13T18:17:38.000+0000100FALSETRUE-800020120
erin7passive2019-03-24T11:28:24.000+0000010FALSETRUE-7000030130
bob10promoter2018-12-04T13:53:48.000+0000100FALSETRUE-2000040140
lori0detractor2018-08-07T10:16:02.000+0000100TRUEFALSE-3000070150
maggie9promoter2019-07-19T12:38:18.000+0000001TRUEFALSE-4000060160
debra9promoter2019-03-24T13:02:53.000+0000010TRUEFALSE-5000055170
sharon 3detractor2018-05-22T08:49:32.000+0000001TRUEFALSE-6000045180
pete9promoter2018-03-20T17:04:52.000+0000010TRUEFALSE-7000085190

 

Let me know if this makes it easier to assist.

 

The other idea I have is the potential relationships I have between the tables:

henriley_0-1630346936739.png

Feature Selector (1) is connected to Dim Geography on a Many-to-One relationship through the Business Partner. The Business Partner can take multiple surveys but will only have one latitude and longitude in Dim Geography. Dim Geography connects to Fact Features on a One-to-Many relationship on the Business Partner. The one location connects to the many surveys taken on the Business Partner. Fact Features and Feature Selector (1) are duplicates of each other. Feature Selector (1) is used to filter the values of the different features and Fact Features is used for the counts/percents we see in the cards on the top of the report.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.