cancel
Showing results for
Did you mean:
Highlighted
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.

thank you for helping me

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I

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])))

5 REPLIES 5
Highlighted
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
Helper I

Hi,

the distincount is one thing.

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

 week distinctcount cars minimum of distinct car during week maximum ofdistinct car during week 19 4 3 4 20 7 5 7
Highlighted
Super User II

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
Helper I

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:

Highlighted
Helper I

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])))

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors