Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
josteinross
Advocate I
Advocate I

Distribution of a measure

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:

 

CustomerCommercial
1A
1B
2A
3A
3B

 

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:

josteinross_0-1672928589984.png

However, I can't figure out how to display an x-axis like this. Anyone who can help me?

 

Thanks!

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

One of ways to achieve this is to create a result table like below.

Jihwan_Kim_3-1672930676356.png

 

Jihwan_Kim_4-1672930692137.png

 

 

Jihwan_Kim_2-1672930632275.png

 

 

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.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, 

One of ways to achieve this is to create a result table like below.

Jihwan_Kim_3-1672930676356.png

 

Jihwan_Kim_4-1672930692137.png

 

 

Jihwan_Kim_2-1672930632275.png

 

 

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.


Go to My LinkedIn Page


Like clockwork, thank you very much!

FreemanZ
Super User
Super User

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:

FreemanZ_0-1672930606875.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.