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
SarikaKumari18
Helper III
Helper III

Need help with DAX measure to show column with Blank value in Table

Hello all,

I would need your help for the below requirement. I have tried myself but not meeting complete requirement
I have table with below column which shows open/close response details.

In case of closecategory within 24hrs and after 24Hrs , "closereason" gets translated to defined conutry languages and "emailcloseby" will be tagged to en always and doesn't store value for New/Late closecategory

responseid   closedresponseid    closecategory   emailclosedby     closeReason    languagecode   country
a1b1within 24Hrsabc@gmail.comtestingenBelgium
a1b1within 24Hrs testennlBelgium
a1b1within 24Hrs essaifrBelgium
a2b2after 24Hrstest@gmail.comtestenPortugal
a2b2after 24Hrs testeptPortugal
a3 Late   Italy
a4 Late   Poland
a5 New   Poland
a6 New   France


Report should have slicer of closecategory and languagecode(taken from dimension table) along with table visual which will have all details.
Languagecode slicer should show data in table based on selected value and If nothing is selected show value any among them in case of more than 1 language for one country.

I have written below measure which I should use instead of column closereason in table which filter data correctly based on language but requirement is to show record(with blank value for column closereason)in table when closedcategory is selected all which also includes closecategory=New/Late(langugage code is blank).When closecategory is New/Late then closereason and languagecode will not have data.

Translated_Closereason = SWITCH(SELECTEDVALUE(Sheet1[languagecode]),
"fr",MAXX(FILTER(Sheet1,Sheet1[languagecode]="fr"),[closeReason]),
"nl",MAXX(FILTER(Sheet1,Sheet1[languagecode]="nl"),[closeReason]),
"pt",MAXX(FILTER(Sheet1,Sheet1[languagecode]="pt"),[closeReason]),
"pt",MAXX(FILTER(Sheet1,Sheet1[languagecode]="pt"),[closeReason]),
MAX(Sheet1[closeReason]))

Similarly, I have to write one more DAX for Email which should show always show the value irrespective of languagecode.
Tranlsate_emailcloseby= MAX(emailcloseby) which again having same problem like closereason as row itself gets disappeared

SarikaKumari18_0-1642089766681.png

 

Please see screenshot and refer the  bottom table which doesn't show data for New/Late closecategory.

If there is nothing selected from both slicers then result should be like 

RESULTS :

responseid  closedresponseidclosecategoryemailclosedbycloseReasoncountry
a1b1within 24Hrsabc@gmail.comtestenBelgium
a2b2after 24Hrstest@gmail.comtestePortugal
a3 Late  Italy
a4 Late  Poland
a5 New  Poland
a6 New  France


Please help with this.
Thanks very much in advance !

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @SarikaKumari18 ,

 

Sorry, not very clear.

I'm not sure what you expect when filter selection. The following is the result of neither slicer being selected.

Measure = IF(MAX('Table'[emailclosedby])=BLANK()&&MAX('Table'[closecategory])<>"Late"&&MAX('Table'[closecategory])<>"New",1)

Put the measure into the visual level filter, set show items when the value is 1.

vstephenmsft_0-1642487601277.png

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @SarikaKumari18 ,

 

Sorry, not very clear.

I'm not sure what you expect when filter selection. The following is the result of neither slicer being selected.

Measure = IF(MAX('Table'[emailclosedby])=BLANK()&&MAX('Table'[closecategory])<>"Late"&&MAX('Table'[closecategory])<>"New",1)

Put the measure into the visual level filter, set show items when the value is 1.

vstephenmsft_0-1642487601277.png

 

 

Best Regards,

Stephen Tao

 

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

Thanks very much @v-stephen-msft , this solved my problem.
I have also achieved by taking distinctcount of responseid in table which can be hidden.

Thanks again for taking time to look into this

SarikaKumari18
Helper III
Helper III

@smpa01 @amitchandak @AlexisOlson 
Could you please take a look into this and help me with this.
Sorry for bothering at busy time. 
Your help would be much appreciated! Thanks much in advance

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