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
Anonymous
Not applicable

Remove totals from measures even when only one value is selected

Hi there,

 

I have a measure that i would like to remove totals from. And the common solution I found online is to use HASONEVALUE formula. Which works if there are several rows of data are returned. But this does not work if only one row is returned.

 

Here is my meaure

Option Description:= IF(HASONEVALUE('Tenant Occupancy'[TenantCode]),IF(NOT ISBLANK(CALCULATE(MAX('dim DimLeaseOption'[OptionTerm]),FILTER('dim DimLeaseOption', RELATED('Tenant'[Tenant Code]) = SELECTEDVALUE('Tenant Occupancy'[TenantCode])),'dim DimLeaseOption'[OptionStatus] = "Active")),CALCULATE(MAX('dim DimLeaseOption'[OptionTerm]) & " months | Description: " & MAX('dim DimLeaseOption'[OptionDescription]) ,FILTER('dim DimLeaseOption', RELATED('Tenant'[Tenant Code]) = SELECTEDVALUE('Tenant Occupancy'[TenantCode])),'dim DimLeaseOption'[OptionStatus] = "Active")))

 

If only one row is returned in the output total appears, which is what i would like to avoid.

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Replace HASONEVALUE with HASONEFILTER.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thanks Ashish, but this solution did not work as it is a row level filter. Repalcing has onevalue returns blanks

hasonevalue(tenantcode) - tenantcode here is a row in a table visual.

 

What else do you reckon we should try?

No idea.  If you can describe the business question, share some data and show the expected output, then i may be able to help.


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

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