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
jyaul786
Helper II
Helper II

Column chart salary and salary %

Dear Friend,

 

i have one table : salary_table: 

Emp IDsalary
emp1100
emp22589
emp35412
emp469854
emp5411

 

and i want to display column chart, with changeable salary and salary %  by slicer selection : Salary & Salary %

jyaul786_0-1690695390836.png

so that i create one extra table with field View By values( Salary and Salary %):  

jyaul786_1-1690695455275.png

 

i created measures: 

Salary_ =
var salary=SUM(salary_table[salary])
var salary_percentage=salary/CALCULATE(SUM(salary_table[salary]),ALL(salary_table))
return
IF(SELECTEDVALUE('Table'[ViewBy])="Salary",salary,salary_percentage)
 
whenever i change with slicer to Salary % , i would like to get salary % on column chart.How can i get this, or do you have another idea.
Thanks

 

 

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try using Field Parameter feature.
Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1690699065367.png

 

Jihwan_Kim_1-1690699163902.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


Thanks for your reply, actually i am using Power BI Desktop RS where fields parameter is not supported by RS. if you have any other solution then let me know.

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.