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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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