Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Guys,
I have some issue with results on powerBI differing from DB. I have a query like this on DB:
SELECT DISTINCT(Sale_SK), DATE
FROM [dbo].[table_sales]
WHERE status='sold' AND Date>'2018-01-01 00:00:00.000'
Sale_SK is an ID and can be repeated.
That's return the number 423.
I do a measure in powerBI like Sales = DISTINCTCOUNT(table_sales[Sale_SK]) to see this number, and I add two slicers with Year (Calendar table linked to mi column Date in a relation) and "Status".
So the problem is when I select Year=2018 and Status=sold. That's returning me 394.
394 is the same if I do this SELECT (without Date Column) on SQL_DB:
SELECT DISTINCT(Sale_SK)
FROM [dbo].[table_sales]
WHERE status='sold'
Anyone knows how can I do to see the correct result like 423 filtering or doing a measure correctly in both with date?
Thank you very much in advance.
Solved! Go to Solution.
@Anonymous,
You may use measure below.
Measure = COUNTROWS ( SUMMARIZE ( table_sales, table_sales[Sale_SK], table_sales[Date] ) )
@Anonymous,
You may use measure below.
Measure = COUNTROWS ( SUMMARIZE ( table_sales, table_sales[Sale_SK], table_sales[Date] ) )
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 71 | |
| 38 | |
| 29 | |
| 27 |