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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dataset Modeling question

Dear,

 

I facing this issue:

I'm currently building a report that summarizes data about articles, it can show data of 1 article, multiple articles or all articles. One of the KPI's that I have is "number of orders" . The problem that i'm facing is that I don't know how build my dataset correctly for the issue that I will explain here:

 

Here is a small extract from my dataset

Knipsel.PNG

 

 

 

When ProductKey 5373 is selected in the Power BI Dashboard, its showing 82 orders, which is correct.

When ProductKey 5378 is selected in the Power BI Dashboard, its showing 80 orders, which is correct.

 

Lets say that there are 10 orders that contain both productkeys. so amoug these 80 and 82 orders, there are 10 mutual order numbers.

 

When both product keys are selected at the same time, the desired result is (80 - 10) + (82 - 10) = 142.

The way I have built the dataset now, my result will be the sum 162 or the average 81 which is both not what I want.

 

I order to achieve this result, I know I will have to build my dataset in another (lower) granularity, meaning that I have to add the order numbers per productkey in the dataset, and do the distinct count of the order numbers in a later phase...

 

Can anyone break this down for me, because I want to find the best solution for this, and not the quickest or the only one I can come up with Smiley Happy

1 ACCEPTED SOLUTION
Anonymous
Not applicable

My problem is solved, I will use lower granularity for my dataset, and thus a different approach..

View solution in original post

3 REPLIES 3
adityavighne
Continued Contributor
Continued Contributor

@Anonymous 

Take a distinct count instead of count. You will get desired result.

Anonymous
Not applicable

@adityavighne wrote:

@Anonymous 

Take a distinct count instead of count. You will get desired result.


I'm doing a distinct count already.

 

My question is a bit more complex than that. Smiley Wink

 

Anonymous
Not applicable

My problem is solved, I will use lower granularity for my dataset, and thus a different approach..

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors