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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Selded
Helper III
Helper III

Show Text for no data - Dax

I need a dax that will retun text "RDO" for the date that work is showing blank in the below snip. To show the blank i used show data with no values on the date. 

 

Work measure below "

 

 

Work = CALCULATE(SUMX(Mx_VEW_DailyAttendance,IF(Mx_VEW_DailyAttendance[Total Hours]>8,12)))

 

Selded_1-1751385452586.png

 

Many thanks for the help.

 

2 ACCEPTED SOLUTIONS

@Selded Not sure if it will help but here:

Greg_Deckler_0-1751387126565.png

Any chance you can share sample data as text so that I can mock this up?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Hi @Selded 

When a measure is forced to display something other than its actual value when blank, the formula engine performs a full cross-join of the dimension tables in the visual, evaluating each row explicitly. This can result in unexpected data points appearing. For example, a previously removed ID (e.g., one terminated in 2013) may still appear for a selected period, such as late February, but with custom values. That's why you're seeing RDO for those that are not within the slicer selection. You can add a condition to your measure to show only when a date is within the selected range. 

VAR MinDate =
    CALCULATE ( MIN ( 'calendar'[date] ), ALLSELECTED ( 'calendar' ) )
VAR MaxDate =
    CALCULATE ( MAX ( 'calendar'[date] ), ALLSELECTED ( 'calendar' ) )
RETURN
    IF (
        SELECTEDVALUE ( 'calendar'[date] ) >= MinDate
            && SELECTEDVALUE ( 'calendar'[date] ) <= MinDate,
        [rdo measure]
    )

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

It is not a good practise to have formulas return mixed data types.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

@Selded Well, you could create a measure like the following perhaps:

Measure = 
  VAR __Work = SUM( 'Table'[Work] )
  VAR __Result = IF( ISBLANK( __Work ), "RDO", __Work & "" )
RETURN
  __Result

You may also need to change the Value filter behavior (auto-exist) for your Semantic model on the Model view.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

how do i change the value filter behaiour? i tried the dax but is showing RDO multiple time other than for just the selected date with blank.

 

Selded_0-1751386573645.png

 

Hi @Selded 

When a measure is forced to display something other than its actual value when blank, the formula engine performs a full cross-join of the dimension tables in the visual, evaluating each row explicitly. This can result in unexpected data points appearing. For example, a previously removed ID (e.g., one terminated in 2013) may still appear for a selected period, such as late February, but with custom values. That's why you're seeing RDO for those that are not within the slicer selection. You can add a condition to your measure to show only when a date is within the selected range. 

VAR MinDate =
    CALCULATE ( MIN ( 'calendar'[date] ), ALLSELECTED ( 'calendar' ) )
VAR MaxDate =
    CALCULATE ( MAX ( 'calendar'[date] ), ALLSELECTED ( 'calendar' ) )
RETURN
    IF (
        SELECTEDVALUE ( 'calendar'[date] ) >= MinDate
            && SELECTEDVALUE ( 'calendar'[date] ) <= MinDate,
        [rdo measure]
    )

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Wrapping the measure in this worked. thank you

@Selded Not sure if it will help but here:

Greg_Deckler_0-1751387126565.png

Any chance you can share sample data as text so that I can mock this up?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.