Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
Solved! Go to Solution.
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])))
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
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 |
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
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:
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])))
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |