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

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.

Reply
KabirDhupelia
Regular Visitor

Histogram in PowerBI using numerical data

Hi

I have data which is structured as follows. I need to create a histogram showing prices (prices are in R per R100. Example, Bob pays R18 600 for a R6 000 000 transaction, this equates to a revenue rate of R0.31 per R100.)
The histogram needs to have prices on the x axis, and the number of clients 'per price'. How do I go about doing that? Because my price is calculated as a measure, I can't bring it into a non value field. 
 Sample data.PNG

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @KabirDhupelia ,

 

One sample for your reference. Please check the following steps as below.

 

1. Creat two calculated columns as below and format them as number. 

 

 

Rev = RIGHT('Table1'[Revenue],LEN('Table1'[Revenue])-1)
val = RIGHT('Table1'[Value],LEN('Table1'[Value])-1)

 

 

2. New another calculated column.

 

 

Price = 'Table1'[Rev]/Table1[val]

 

Capture.PNG

2.PNG

 

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

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @KabirDhupelia ,

 

One sample for your reference. Please check the following steps as below.

 

1. Creat two calculated columns as below and format them as number. 

 

 

Rev = RIGHT('Table1'[Revenue],LEN('Table1'[Revenue])-1)
val = RIGHT('Table1'[Value],LEN('Table1'[Value])-1)

 

 

2. New another calculated column.

 

 

Price = 'Table1'[Rev]/Table1[val]

 

Capture.PNG

2.PNG

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.