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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
WestWinter
Helper II
Helper II

HASONEVALUE alternatives?

So I currently have this formula that works well to show a blank value at an aggregate level, while showing up correctly at a row level. However, I noticed that if the aggregate level only has one value (that is the row value), it still shows the row value... Is there an alternative to this, where it shows no values at aggregate level at all?
 

Label =

// Blank at aggregate level
if(HASONEVALUE('Table'[Code]),
LASTNONBLANK('Table'[Code],1),
BLANK()
)

 
1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @WestWinter 

you can try like this,

vxiaotang_0-1628848889923.png

turn off Row subtotals

vxiaotang_1-1628848990440.png

 

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

7 REPLIES 7
v-xiaotang
Community Support
Community Support

Hi @WestWinter 

you can try like this,

vxiaotang_0-1628848889923.png

turn off Row subtotals

vxiaotang_1-1628848990440.png

 

 

Best Regards,

Community Support Team _Tang

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

WestWinter
Helper II
Helper II

bump

mahoneypat
Microsoft Employee
Microsoft Employee

Have you tried an expression like this?

 

Label =

// Blank at aggregate level
if(ISINSCOPE('Table'[Code]),
LASTNONBLANK('Table'[Code],1),
BLANK()
)

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


amitchandak
Super User
Super User

@WestWinter , can you shared the expected output example, Isfiltered or  isinscope can help

 

example

if(isinscope ('Table'[Code]),
LASTNONBLANK('Table'[Code],1),
BLANK()
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak This is what I get using my original formula:

 

Annotation 2021-08-11 081152.jpg

As you can see in my matrix, the row with only one value under it will replicate the value in the 2nd column. However, if there are 2 or more values under the row, it will not replicate the value in the 2nd column.

 

I had tried your formula, but everything is just blanked out in a non-filtered state.

@WestWinter , Not clear with your example. 

 

Can you share the expected output and data source (some sample data). 

Seem like you need to check if the below level has only one row. In that can we need create a formula with allexcept  

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak This is an example of I have on my matrix by using HASONEVALUE formula above if there is only 1 row of value for a particular section (in this case, USA for North America/America).

 

Require the rows (Americas and North America) to be blank like what is happening for Asia & North Asia.

 

Thanks!

 

CountriesCountry Code
AmericasUSA
   North AmericaUSA
       United States of AmericaUSA
Asia 
   North Asia 
       ChinaCN
       JapanJP
       KoreaKR

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors