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

Delete Matrix subtotal when i have 1 line with DAX

Hi guys!

 

We have the following, we have 2 levels, one for country and another for cities. On the other hand, we have a measure that formats the constitution date. I put the screenshot to see the stage:

I want to try to hide the constitution date for the country level. If you look at this I have achieved it when the country has 2 cities, but when I have only 1 city in that country it also shows it in the subtotal. For Example Spain has Jan.-20 however France is blank.

 

image.png

The measures is the next one:

 

Format Constitution Date =
VAR firsconstitutiondate =
LASTDATE(Data[Constitution Date])
VAR firsconstitutiondate_format =
FORMAT(
firsconstitutiondate,
"mmm.-yy"
)
var result =
IF (
HASONEVALUE(Data[City]),
firsconstitutiondate_format
)
return
result
 
any suggestions?
 
Thank in advance.
Best Regards.
 
 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User
1 REPLY 1
amitchandak
Super User
Super User

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