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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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