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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
hidenseek9
Post Patron
Post Patron

Fixed ranking and how to automatically update cards

Hello Power BI Community,

 

I would like to have a customer report where it shows a list of growing customers 

and when I select a particular customer from the list, 

the cards will show 

  1. TTL Sales of the customer
  2. TTL Sales of all customers
  3. The ranking of the customer in respect to all customers
  4. # of TTL customers
  5. The ranking of cutomers in respect to the customer channel
  6. # of TTL customers in a particular Channel
  7. TTL Sales of all customers in the particular channel

Please find below as a sample data and the image of how I would like to data to look like. 

Please also keep in mind that TTL Sales in Power BI I already set it up as a measure. 

Sample Data 

 

When I select "Bison", I would like the text in the card will automatically 

say "Bison Sales" or "Bison Ranking in Meat". 

2020-02-20 11_11_31-Window.png

If you could help me, that would be much appreicated

 

Many thanks,

H

1 ACCEPTED SOLUTION

Hi @hidenseek9 ,

 

Here I have created  a sample for your reference.We can create measures as below to work on it.

SALE = CALCULATE(SUM('Table'[Sales]))
RANK in TTL sotres = RANKX(ALL('Table'[Store],'Table'[Channel]),[SALE],,DESC,Dense)
Ranking in = RANKX(ALL('Table'[Store]),[SALE],,DESC,Dense)
Total sales # = var cha = MAX('Table'[Channel])
return
CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),'Table'[Channel] = cha))
TTL # of stores = CALCULATE(DISTINCTCOUNT('Table'[Store]),ALL('Table'))
TTL Sales = CALCULATE(SUM('Table'[Sales]),ALL('Table'))

Capture.PNG

Btw, for your first requirement, we cannot achieve that automaticly. Currently, we can edit it in format pane.

3.PNG

 

For the second one, we can make the tile name conditional formatting by column name to work around.

2.PNG

 

For more details, please check the pbix as attached.

 

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@hidenseek9 Please use below measures

SelectedStoreSales = CONCATENATE(CONCATENATE(SELECTEDVALUE('Table'[Store])," Sales")&UNICHAR(10),SUM('Table'[Sales]))

Define rank of stores

Rank = RANKX(FILTER(ALL('Table'[Channel],'Table'[Store]),'Table'[Channel]=MAX('Table'[Channel])),CALCULATE(SUM('Table'[Sales])))

Finally rank of store sales in a channel

Measure 2 = CONCATENATE(SELECTEDVALUE('Table'[Store])&" Ranking in "&SELECTEDVALUE('Table'[Channel])&UNICHAR(10),[Rank])

 

@Anonymous 

 

Thank you for your quick reply!

The measure to show the ranking among the channel works perfectly.

However, I cannot seem to figure out how to create a similar measure to show

the ranking among all the customers.

 

Also, while the concatenate measure works, it does not give me the option of showing the values in

thousands, millions or billions and the number is just a string of numbers and difficult to read.

 

Is there any other way (Does not have to be cards) to

1. shows sales as figures (to have the option to show it in TH, M or Billions)

2. Have the description of the text to change depending on the selection of a customer

 

Many thanks,

H

Hi @hidenseek9 ,

 

Here I have created  a sample for your reference.We can create measures as below to work on it.

SALE = CALCULATE(SUM('Table'[Sales]))
RANK in TTL sotres = RANKX(ALL('Table'[Store],'Table'[Channel]),[SALE],,DESC,Dense)
Ranking in = RANKX(ALL('Table'[Store]),[SALE],,DESC,Dense)
Total sales # = var cha = MAX('Table'[Channel])
return
CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),'Table'[Channel] = cha))
TTL # of stores = CALCULATE(DISTINCTCOUNT('Table'[Store]),ALL('Table'))
TTL Sales = CALCULATE(SUM('Table'[Sales]),ALL('Table'))

Capture.PNG

Btw, for your first requirement, we cannot achieve that automaticly. Currently, we can edit it in format pane.

3.PNG

 

For the second one, we can make the tile name conditional formatting by column name to work around.

2.PNG

 

For more details, please check the pbix as attached.

 

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors