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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Help adding holidays to measure

Hello BI community,  

I am currently working on a measure that automatically calculates the variance of 2 days worth of financial data. So far it works but when a holiday comes along the measure does not respond. I added a holiday table and created a relationship between both tables but that does not work. Is there anything that i can add or do to make the table recognize the holidays. This is my current measure; 

  
Variance=  VAR __DAYB4YEST = 
IF(WEEKDAY(TODAY())=2,SUMX(FILTER(GLTABLE,GLTABLE[DATE]=TODAY()-4),GLTABLE[BALANCE]),SUMX(FILTER(GLTABLE,GLTABLE[DATE]=TODAY()-2),GLTABLE[BALANCE]))

VAR __YEST = IF(WEEKDAY(TODAY())=2,SUMX(FILTER(GLTABLE,GLTABLE[DATE]=TODAY()-3),GLTABLE[BALANCE]),SUMX(FILTER(GLTABLE,GLTABLE[DATE]=TODAY()-1),GLTABLE[BALANCE]))

Return (__YEST-__DAYB4YEST)
Desired OutcomeDesired OutcomeSample DataSample Data
Will appreciate any help. Thank you in advance.
2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 


Is there anything that i can add or do to make the table recognize the holidays. 

How to recognize? Should holiday dates be shown in visual? If yes, how to calculate balance and variance for holiday? Are holiday dates listed in fact data table and their corresponding balance are empty? Or holiday dates will be skipped in fact data table? 

 

Please provide more sample data containing holidays.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I need the Holiday dates to be skipped sorry i forgot to mention that. I have a seperate table with the holidays after creating a relationship between the tables i thought just filtering would work but unfortunately it did not. 

This is the holiday table i am usingThis is the holiday table i am using

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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