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
dats
Resolver I
Resolver I

issue in checking condition for header in pie diagram

Dear all,

I have an issue with the conditionl formatting of a header in a pie chart.

 

DateAgegroupdatasourceCustomer
01.07.20noneold1
01.07.20noneold1
01.07.20noneold1
05.07.2018-25new1
15.07.2018-25new1
30.07.2025+new1

 

The pie chart simply shows the distribution of each agegroup. One for 25+, two for 18-25 and 3 for none. Through "Filter on this visual I am filtering out "none" since I don't want to see the amount of the agegroup none in my chart.

 

I want the header to be condiationally formated so that the title for the diagram is "AGE*" when the customer has data from the old and new datasource (01-07-30.07) and only "AGE" if  only data from the new datsource is selected.

 

my dax currently looks like this

 

IF(CALCULATE(COUNTROWS('Data'),FILTER('Data','Data'[datasource]="old"))>=1,"AGE*","AGE")

 

The issue here is that within the diagram I am filtering out "none" values but I would still like the header to have the extension "*" as the user has slected a timeframe that contains both data from the old and from the new source.

How do I change my dax formular so that it evaluates the values in the column datasource and ignoring the filter on the visual?

 

10 REPLIES 10
V-lianl-msft
Community Support
Community Support

Hi @dats ,

 

Is this problem sloved?
If not, please let me know.

 

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

dats
Resolver I
Resolver I

so the actual question here would be how can I "deactivate" the filter on the AGE for the dax formular but keep it active in the cisual so "none" does not appear

@dats  In the above example there is no such "none" Data 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP thanks for the answer

 

lets say the user chooses a timeframe between 01.07 and 30.07 and a customer "1". Then for this customer in general there is data from the old and the new source. In this case I woul like the header to have the extension "*" even if the pie chart does not show the value none

@dats 

Then   The function should be 
Title = IF(SELECTEDVALUE('Table'[datasource])="Old","AGE",
            IF(SELECTEDVALUE('Table'[datasource])="*","A*"))




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


I think it doenst realy solve the issue since "none" is filtered out in the filsual filter.

This is would I woul like to achieve in the end. I dont know how to tell the dax formular for the header to not include the filtering made in "filter on this visual"

 

User selectionheader
01.07-30.07AGE*
05.07.-30-07AGE
01.07.-01.07AGE*

 

@dats 

I think you cannot customise the Column Headers but only the Title of the Table




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


sorry yes this was just an example of outcomes of different combinations. The title would be either AGE or AGE*

Hi @dats ,

 

It should be clarified that if you apply a filter at the visual level, it will affect the current line content of measure. That is to say, when you customize the title, only display the corresponding measure after filtering.

The alternative is to create a nested visual. Set the table title to empty and set the transparency of this visual, and then create a card visual and turn off category label to place in the table title position.

 

Sample .pbix

 

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

VijayP
Super User
Super User

@dats  Try using this Formula

Title = IF(SELECTEDVALUE('Table'[datasource])="Old","AGE","A*")
Please Share your Kudoes



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


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.