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.
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])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |