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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
torkild-oo
Regular Visitor

Dynamic Title

Hi,
I have a project I am working on and to visualise its effect I want to use Power BI. There are 8 activities in the project, and each of the activities' impact is measured in $ as well. resulting in 16 attributes in total. In one Power BI window I want to visualise only the activities themselves, not its impact measured in $, so only 8 of the 16 attributes. 

I have used this code as of now: 

Dynamic Title Summary =
IF(
    ISFILTERED('PBI Summary'[Projects]) || ISFILTERED('PBI Summary'[Attribute]),
    IF(
        DISTINCTCOUNT('PBI Summary'[Projects]) = 1 && NOT(ISFILTERED('PBI Summary'[Attribute])),
        SELECTEDVALUE('PBI Summary'[Projects], "All Ports") & ", All Activities",
        SELECTEDVALUE('PBI Summary'[Projects], "All Ports") & ", " &
        IF(
            DISTINCTCOUNT('PBI Summary'[Attribute]) > 1,
            CONCATENATEX(
                VALUES('PBI Summary'[Attribute]),
                'PBI Summary'[Attribute],
                ", ",
                'PBI Summary'[Attribute],
                ASC
            ),
            SELECTEDVALUE('PBI Summary'[Attribute], "Total Activities")
        )
    ),
    "All Ports, All Activities"
)


With this code, if I select for example Durban, T. Safety initatives and T. Activity, the title of the graph looks like this, exactly as I want it:

torkildoo_0-1677742798124.png


The problem, however, is when i have selected no location and no activity. Then the title looks like below, because I have filtered out the attributes in $:

torkildoo_1-1677742977960.pngtorkildoo_2-1677742997319.png


I want the title to say "All Ports, All activities" when no location or activity is selected, but it seems like that does not happen because I have filtered some of the attributes out. 

I will add a link to a Google Drive file with a sample of the data as well: 
https://drive.google.com/file/d/1gGyFrGVD0ly6PEgHVEtugS7O5cfmke3R/view?usp=sharing

If anyone could provide some guidance for how I could achieve that, it would be greatly appreciated. Thanks! 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

it's fine on my pc

wdx223_Daniel_0-1677747250198.png

 

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

it's fine on my pc

wdx223_Daniel_0-1677747250198.png

 

Thanks, I found a minor setting that made it not work for me 🙂 Works fine for me as well now! 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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