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
powerbr
Frequent Visitor

Measure stops filtering when converted into text

I have the following measure that works properly until d, however, after I apply the last transformation it breaks and stops applying my report filters.

Any ideas on why this could be happening?

 
 
 

 

 
 

Capture.PNG

 

 

Many thanks!

 

7 REPLIES 7
daxer-almighty
Solution Sage
Solution Sage

@powerbr 

 

Please do yourself a favour and get rid of all these horrible IF's. There's a much better way: SWITCH.

Payeras_BI
Super User
Super User

Hi @powerbr ,

Are TestInformation[desirability_...] columns formated as numbers?

Can, in any case, the result of d be > 9?

Regards,

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

Hi @Payeras_BI 

TestInformation[desirability_] are numbers.

They will never be > 9, I control that through my pipeline.

 

 

Hi @powerbr ,

Can you expand on "it breaks and stops applying my report filters"?

Please provide screenshots of how are you applying those report filters in your visualization?

Regards,

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

@Payeras_BI 

Thanks for the support.

The datamodel is quite simple:

powerbr_0-1608122698623.png

(Note that the masure is contained in the values table)

Both tables are connected through TestID, being Testinformation the DimTable.
I have a slicer with TestID inside the report, set up to, when I use the measure without converting it into text, the Values table successfully gets filtered by TestID; however, when I return the text values, the measure returns all TestID values ignoring the filter.

powerbr_1-1608122920036.png

I resorted to changing the pipeline, but I still wonder if I am missing something from this specific DAX behaviour.

 

 

Hello @powerbr ,

 

If I understood well, at the end of your code, I would substitute:

 

RETURN r

 

by 

 

RETURN
IF(NOT ISBLANK(d),r)

Regards,

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

I will try this today.

Sorry for the late response, I changed my datapipe to accomodate for the data I want to display and reduce some modelling in PowerBI.

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