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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Keep initial balance but remove blanks rows

Hi! 

I have the following scenario:

I'm trying to remove all blank rows based on year selection, but keeps the initial balance for those non blank rows.

verosu_0-1740090020557.png

 

I'm using the following measure to calculate the values in the matrix:

 

Initial Balance Year =
VAR CurrentYear = SELECTEDVALUE('Balance Date'[Year])
VAR Balance= sum('Fact_table'[amount])
VAR DateStart = CALCULATE(MIN('Date Budget'[Date]), ALLSELECTED())
VAR OpenBalance = CALCULATE('Fact_table'[amount], 'Date Budget'[Date] < DateStart)
VAR Total = not ISINSCOPE('Balance Date'[Year])
VAR Result =
    if(CurrentYear = "Initial Balance", OpenBalance,
        if(Total, (sum('Fact_table'[amount])+ OpenBalance, (sum('Fact_table'[amount])))
RETURN
    Result

 

Is there any way to do it?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, I use the sample data in PowerBI Desktop and can filter the matrix by creating a measure.

vlinhuizhmsft_3-1740106789179.png

 

Here to determine if the profit is greater than 100000:

 

Measure = IF(MAX('financials'[Profit])>100000,1,0)

 

 

Add a filter to this visual:

vlinhuizhmsft_1-1740106426380.png

 

Result:

vlinhuizhmsft_4-1740106820030.png

 

 

Best Regards,
Zhu

 

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

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, I use the sample data in PowerBI Desktop and can filter the matrix by creating a measure.

vlinhuizhmsft_3-1740106789179.png

 

Here to determine if the profit is greater than 100000:

 

Measure = IF(MAX('financials'[Profit])>100000,1,0)

 

 

Add a filter to this visual:

vlinhuizhmsft_1-1740106426380.png

 

Result:

vlinhuizhmsft_4-1740106820030.png

 

 

Best Regards,
Zhu

 

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

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.