The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I want to show the number of products sold per date in a table visual.
I've got a measure NrOfProducts = COUNTROWS(Products)
Also I've got Products[sold on] of type date/time (not a Date Hierarchy btw).
Added both as values in the visual.
I want to see this:
Sold on | Amount |
1/1/2021 | 2 |
2/1/2021 | 1 |
But what I see now is:
Sold on | Amount |
1/1/2021 | 1 |
1/1/2021 | 1 |
2/1/2021 | 1 |
What am I missing?
Solved! Go to Solution.
Hi @Dicko,
You can try measure as:
Measure =
CALCULATE(
COUNTROWS('Products'),
FILTER(
ALL('Products'),
'Products'[Sold on]=MAX('Products'[Sold on])
)
)
You can also removing other columns with different values from the table visual, and then your original measure will work well.
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Dicko,
You can try measure as:
Measure =
CALCULATE(
COUNTROWS('Products'),
FILTER(
ALL('Products'),
'Products'[Sold on]=MAX('Products'[Sold on])
)
)
You can also removing other columns with different values from the table visual, and then your original measure will work well.
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
maybe it only shows date without time for sold on column, you can try to convert sold on column from date type to datetime type to see if the time on 2020/1/1 is different. Changing data type will not change the data.
Proud to be a Super User!
Hi @Dicko
Could you please post your table structure?
Otherwise you can try like fllowing
1) take date and product in the grid
2) then click on the product column in fields pane
3) now click on count
It will give you the correct result.
Best regards,
Pooja Darbhe
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the July 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
109 | |
68 | |
46 | |
42 |
User | Count |
---|---|
188 | |
86 | |
77 | |
74 | |
60 |