cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

unique values of cars per day during the week

Hi everybody.
maybe this will be easy for you but I can't do it.
They drive cars every day. Some of them several times a day.
I want to see how many and only unique cars were in a week. It always shows me the week and I can't set the condition for the day.

unique trouble.png

thank you for helping me

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

I found a solution.

Create new column: week

MAX car one day of the week - CALCULATE(DISTINCTCOUNT(table[car]); FILTER(ALLSELECTED('table');' table'[week]-MAX('table'[week])))

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

Hey @Mareno_123 ,

 

create a table visual, using the week column from the "base" table.

Create a measure using the DAX function DISTINCTCOUNT like so:

no of unique cars =
DISTINCTCOUNT('base"[car])

 Hopefully, this provides what you are looking for.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Highlighted

Hi,

the distincount is one thing.

But i need max and min of distincount "car" per week.

weekdistinctcount carsminimum of distinct car during weekmaximum ofdistinct car during week
19434
20757
Highlighted

Hey @Mareno_123 ,

 

I have to admit that I do not understand the business rule that determines the "min" and "max" of unique cars per week, please elaborate more on this.

 

I think it's also helpful if you provide sample data, the way you did for the expected result, and not just as a picture.

 

Regards,

Tom

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Highlighted

Im so sory. Im not good in english, im not good in power bi.

 i try so mamy min and max formulas, but no one work for me because i dont know use filter or comand right.

measure:  unique car = DISTINCTCOUNT('table'[car])

measure MIN: MINX('table';[unique car]) 

or measure max: MAXX('table';CALCULATE(DISTINCTCOUNT('table'[car])))

 

test file:

power bi test file unique cars 

Highlighted

I found a solution.

Create new column: week

MAX car one day of the week - CALCULATE(DISTINCTCOUNT(table[car]); FILTER(ALLSELECTED('table');' table'[week]-MAX('table'[week])))

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors