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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
hnowotny17
Helper I
Helper I

Subtotal question

Hello,

 

I would like to kindly ask for a help.

 

I am suming up sold values from few different sources. In the end of the table I have an evolution to see, if the source is perfoming or not. Unfortunately I dont have last year data from all of the sources and thats why there is a blank space.

 

My question is regarding the subtotal - In the subtotal of the last 2 colums (LW vs LY and MtD vs LY) I would like to count only with sources, where are data from last year. That means that I would like to filtered out 3 sources marked by yellow colour. (Source no: 2, 9, 11).

 

Does anyone know, how to do it?

 

Many thanks!

 
hnowotny17_1-1666262634733.png

 


 

2 REPLIES 2
Shaurya
Memorable Member
Memorable Member

Hi @hnowotny17,

 

Let's say you have a measure [LW vs LY] that calculates the total. You can use a filter context on it.

 

Ignore Blanks = CALCULATE([LW vs LY],FILTER('Table','Table'[LY]<>BLANK()))

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: How to Export Telemetry Data from Azure IoT Central into Power BI

Dear @Shaurya,

 

thank you a lot for your reply.

 

I´ve tried to use this formula, but it didn´t allow me to add correct table.

 

The formula for this measure LW vs LY is following:

 

LW vs LY =
VAR __BASELINE_VALUE = [SO LY]
VAR __VALUE_TO_COMPARE = [SO LW]
RETURN
    DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
 
Do you have any idea, how to "Ignore blanks" put here?
 
Many thanks and have a nice day!
Jan N

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.

Top Solution Authors