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
johanvjr
New Member

Show count distinct values per week

Hi,

 

i'm creating visuals for a order per week status. Now i have ordernumbers that come back a few times. These numbers have the same orders. 

 

When i do a count distinct for the full year the showed value is oke. 

When i add a table visual with per week the count discount doesnt work correctly. Orders that are processed in week 1 and in week 2 are show in both bars in the visual.

 

So:

OrderID - Date - Name

212 - 1/01/2018 - Test1

213 - 3/01/2018 - Test2

212 - 1/02/2018 - Test1

 

When i do i column chart with count distint on the OrderID column i get bars with week 1 = 2, week 5 = 1. 

Because of the count distinct it should be week 1 = 2, week 2 = 0 

 

What am i doing wrong? Hope somebody can help. 

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @johanvjr,

 

Based on your information, I 'm still a little confused about your scenario.

 

If it is convenience, could you share some dummy data sample which can reproduce the scenario and you expected output, so that we can help further investigate on it?

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherry,

 

I have two tables. One with date information and one with customer and id information. The id's link the tables. 

So when i want to know al the different customers for a period i do a Count discount.

 

You see the Count discount number is 1. So there is 1 customer (KlantX) for the total period. 

Now i want to see this on a montly bases. In that diagram you see may is 1 and august is 1. In this case i want only the first record to be counted. 

 

So if KlantX has had the first order on january the 3th then janurari should be the only count for the diagram. 

 

I want to know how many customers i have per month but the time period for the count distinct must be the full year. 

 

Does this makes things clear? 

 

image.png

johanvjr
New Member

Hi,

 

i'm creating visuals for a order per week status. Now i have ordernumbers that come back a few times. These numbers have the same orders. 

 

When i do a count distinct for the full year the showed value is oke. 

When i add a table visual with per week the count discount doesnt work correctly. Orders that are processed in week 1 and in week 2 are show in both bars in the visual.

 

So:

OrderID - Date - Name

212 - 1/01/2018 - Test1

 

In the visual you see for day 6 two times klantcode. This should be 1 because the same klantcode has already been in day 5.

Hope this helps. 

 

image.png

213 - 3/01/2018 - Test2

212 - 1/02/2018 - Test1

 

When i do i column chart with count distint on the OrderID column i get bars with week 1 = 2, week 5 = 1. 

Because of the count distinct it should be week 1 = 2, week 2 = 0 

 

What am i doing wrong? Hope somebody can help. 

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.