Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all
I have a model in which I have a table that displays customers and each time commercials are displayed to them like so:
Customer | Commercial |
1 | A |
1 | B |
2 | A |
3 | A |
3 | B |
What I want to do is count the number of distinct commercials each customer is shown, and then aggregate that up to get the amount of customers that get shown 1 commercial, the amount that get 2 etc.
The final result should in this case look like this:
However, I can't figure out how to display an x-axis like this. Anyone who can help me?
Thanks!
Solved! Go to Solution.
Hi,
One of ways to achieve this is to create a result table like below.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
One of ways to achieve this is to create a result table like below.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Like clockwork, thank you very much!
hi @josteinross
try to
1) create a calculated table like this:
SumTable =
ADDCOLUMNS(
VALUES(TableName[Customer]),
"CommercialCount",
CALCULATE(DISTINCTCOUNT(TableName[Commercial]))
)
2) plot a column chart like this:
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
88 | |
85 | |
68 | |
68 | |
64 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |