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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dax which can change the value of the Subtotals in one Column if it does not appear in the other!

Hello,

 

Is their a Dax Formula which can make my 2019-2020 Column Exclude Accounting periods that are not yet available in current year 2020-2021 so that the same periods are being compared in the totals? I know I can right click on periods 8 through 12 and simply exclude them but I'd like a Dax that can do this automatically. 

 

Thank you!

 

ESDC_0-1608229548273.png

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Create the following measure and apply.

Fowmy_0-1608236426597.png

 

 

 

There a video from sqlbi.com that solves the same problem in a different way:
 https://www.youtube.com/watch?v=bAOs5LTP0I0

 

 

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

 

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

If the row and column headers of your visual have been dragged from the Calendar Table and the Calendar Table has dates only till the last day available on the source tble, then try this measure

=if(isblank(calculate([measure],nextyear(calendar[date]))),blank(),[measure])

Does this help?


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

I like this approach as well but my current year data disappears and only my previous year show up. Yes both my accounting period and Fiscal Year come from the Calendar, and my Calander end date is built from the last data load. I should have posted my Visualazations and fields.  In your formula what should go in my first [measure] and what should go in my next [measure]? 

 

ESDC_0-1608327690459.png

 

Hi,

[Total amount] as shown in Fowmy's image.


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

@Anonymous 

Create the following measure and apply.

Fowmy_0-1608236426597.png

 

 

 

There a video from sqlbi.com that solves the same problem in a different way:
 https://www.youtube.com/watch?v=bAOs5LTP0I0

 

 

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

 

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.