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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
aamirkhan_WT
Helper II
Helper II

Dynamic Title not working if there is no value then show |"No Data" if there is value then "Data"

Hi All

 

Dynamic Title not working if there is no value then show |"No Data" if there is value then "Data" basde on measure I have created
Dynamic tiltel 

HasData =
IF(
    ISBLANK([Q2]) ,
    "No Data Available: Would you be open to a full-time, online education for your child?",
    "Would you be open to a full-time, online education for your child?"
)


There is dax based on that it will show title 

Q2 =
----------------------------------NA-------------------------------------
VAR selectedFilter = SELECTEDVALUE(DimCountry[ID])

VAR TotalQ2Overall_NA =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "NA" }
    )

VAR TotalQ2PerYearCountry_US =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
        ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],DimCountry[Country],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "US" }
    )

VAR _Result_US =
    DIVIDE(TotalQ2PerYearCountry_US,
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year]),
        'CombinedData_23_24_25'[Country] IN { "NA" }
    ),0)


VAR TotalQ2Overall =
    CALCULATE(
        COUNT('CombinedData_23_24_25'[ID]),
        ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year])
    )

VAR _Result_NA =
    DIVIDE(TotalQ2Overall_NA,TotalQ2Overall,BLANK())
----------------------------------APAC-------------------------------------
VAR TotalQ2Overall_APAC =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "APAC" }
    )

VAR TotalQ2PerYearCountry_PH =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
        ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],DimCountry[Country],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "PH" }
    )

VAR _Result_PH =
    DIVIDE(TotalQ2PerYearCountry_PH,
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year]),
        'CombinedData_23_24_25'[Country] IN { "APAC" }
    ),0)

VAR TotalQ2PerYearCountry_MY =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
        ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],DimCountry[Country],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "MY" }
    )
   
VAR _Result_MY =
    DIVIDE(TotalQ2PerYearCountry_MY,
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year]),
        'CombinedData_23_24_25'[Country] IN { "APAC" }
    ),0)

VAR TotalQ2PerYearCountry_ID =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
        ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],DimCountry[Country],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "ID" }
    )

VAR _Result_ID =
    DIVIDE(TotalQ2PerYearCountry_ID,
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year]),
        'CombinedData_23_24_25'[Country] IN { "APAC" }
    ),0)


VAR _Result_APAC =
    DIVIDE(TotalQ2Overall_APAC,TotalQ2Overall,0)
----------------------------------Oceania-------------------------------------
VAR TotalQ2Overall_Oceania =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "Oceania" }
    )

VAR TotalQ2PerYearCountry_AU =
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
        ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year],DimCountry[Country],CombinedData_23_24_25[Q2_Purchase Decision]),
        'CombinedData_23_24_25'[Country] IN { "AU" }
    )
VAR _Result_AU =
    DIVIDE(TotalQ2PerYearCountry_AU,
    CALCULATE(
        COUNT(CombinedData_23_24_25[Q2]),
         ALLEXCEPT('CombinedData_23_24_25', 'CombinedData_23_24_25'[Year]),
        'CombinedData_23_24_25'[Country] IN { "Oceania" }
    ),0)


VAR _Result_Oceania =
    DIVIDE(TotalQ2Overall_Oceania,TotalQ2Overall,0)
------------------------------------------------------------------------------
RETURN

SWITCH(

    selectedFilter,
   1, _Result_US,
   2, _Result_NA,
   3, _Result_AU,
   4, _Result_Oceania,
   5, _Result_PH,
   6, _Result_MY,
   7, _Result_ID,
   8, _Result_APAC

    )
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the replies from dharmendars007 and elitesmitpatel.

 

Hi @aamirkhan_WT ,

 

Change SELECTVALUE to MAX in the measure you created:

vlinhuizhmsft_0-1728886005566.png

 

The result is as follows:

vlinhuizhmsft_1-1728886134296.png

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
aamirkhan_WT
Helper II
Helper II

Any update 

aamirkhan_WT
Helper II
Helper II

Here is the file https://drive.google.com/file/d/1R8zvHB3WlEPC8e7VZDzH7d35vovrDlpJ/view?usp=sharing
There are 2 tabs
APAC & NA
NA has data 
APAC has not data

I want dynamuic title if there is Data then it show "Data Existed" and if no data then it will show "No Data"

dharmendars007
Super User
Super User

Hello @aamirkhan_WT , 

 

Its difficult to to check your measure without a sample file however what i can suggest is please ckeck if there is truly no data like if it has soaces or Zero's.

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

elitesmitpatel
Super User
Super User

share the dummy pbix file

Here is the file https://drive.google.com/file/d/1R8zvHB3WlEPC8e7VZDzH7d35vovrDlpJ/view?usp=sharing
There are 2 tabs
APAC & NA
NA has data 
APAC has not data

I want dynamuic title if there is Data then it show "Data Existed" and if no data then it will show "No Data"

Anonymous
Not applicable

Thanks for the replies from dharmendars007 and elitesmitpatel.

 

Hi @aamirkhan_WT ,

 

Change SELECTVALUE to MAX in the measure you created:

vlinhuizhmsft_0-1728886005566.png

 

The result is as follows:

vlinhuizhmsft_1-1728886134296.png

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors