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
Anonymous
Not applicable

Slicer not connecting to visualisation of calculated column

Hi Community, 

I'm fairly new to Power BI and seeking help for a project of mine. 

So, the situation is:

I have company names in col1, their score in col2 (If rated). I want to create a measure that would consider the line items with a score as "Rated" and the one with blanks as "Not-rated" and visualise the count of rated and Non rated in a pie chart.

 

As of now, I created a calculated conditional column and visualised that column in the pie chart, but if i do that, slicers are not affecting the data on the visualisation. I want the data of my pie chart to change according to slicers, which, from my search I've concluded can't be achieved with calculated columns. I hope I've articulated my question clearly, please ask for clarification if required. Thanks in advance. 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Please check the following methods.

Column:

Status = IF([Score]<>BLANK(),"Rated","Not-rated")

vzhangti_0-1645769959503.png

Measure:

Count = 
CALCULATE(COUNT('Table'[Status]),FILTER(ALL('Table'),[Status]=SELECTEDVALUE('Table'[Status])))

vzhangti_1-1645770010124.pngvzhangti_2-1645770031480.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more.

View solution in original post

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Please check the following methods.

Column:

Status = IF([Score]<>BLANK(),"Rated","Not-rated")

vzhangti_0-1645769959503.png

Measure:

Count = 
CALCULATE(COUNT('Table'[Status]),FILTER(ALL('Table'),[Status]=SELECTEDVALUE('Table'[Status])))

vzhangti_1-1645770010124.pngvzhangti_2-1645770031480.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more.

amitchandak
Super User
Super User

@Anonymous , In power Query replace null values in col2 with Not-rated . you can null (all small) to replace.

Power Query Replace Value: https://youtu.be/hkZhZbR7Kmk

 

If you want change legend(axis in other visuals) in pie then you need bookmarks

 

If you want to change the measure, you need measure slicer

 

 

measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
https://www.youtube.com/watch?v=vlnx7QUVYME

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/


Axis Slicer
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://www.youtube.com/watch?v=6jeSIRpjv0M

Anonymous
Not applicable

Hey Amit, thankls for your reply, I can't replace the score in col2 as the scores are used by other visualisations. Moreover, this table that has the company name and scores is a summarised table, hence dosen't show up in power query, is there a way to achieve these by creating a measure?

@Anonymous , new column in DAX

 

coalesce([col2], "Not-rated")

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.

Top Solution Authors