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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Data depending on the weekday

Hello,

 

I want to create a report which shows data and depend on the acutal type of day (weekday).

If it is monday, then show the data from friday, and if it is thuesday-friday then show the data from the previous day. 

 

I have 2 table connected with another, calendar table.

I write dax formula 

like this:

Aleksis_97_0-1680599734397.png

which show me the date depend on the weekday

 

but in another table it looks like this

Aleksis_97_1-1680599832631.png

 

If you notice, the last date in first table is 31.03.203, and in second table 03.04.2023.

 

In results i need to divide column 'lookup scrap' by 'lookup product' so i need to have the same date.

 

If i choosing the last date then i have another date...  but in monday (03.04.2023) i need to show data from friday (31.03.2023).

 

This date coming from sql database so i cannot edit this to have the same date in each table. 

 

Im trying to resolve this like this:

Aleksis_97_2-1680600188828.png

 

but of course i have data to production not scrap because in scrap the last date is 31.03...

 

Im not sure if i explain this well  but i hope so...

 

Pls help 😞

 

3 REPLIES 3
Bennykil
New Member

vanessafvg
Community Champion
Community Champion

why is there a difference in the date? how do you know they belong to the same transaction?  

 

what is your purpose, can you explain the business requirement.    there are several functions you can use but in order to find the best solution, i need to understand the business rule of how to join the tables to do the divide.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

The data came from some web.pages, 

Its general production company.. 

in the morning when we starting production the machine sending some signals, and we have data for new day(production tabl), 

but the date from second table occured (or not) if we have some scrap in prodution and they add this manually. So the new day ocurred if the fulfill the table in web, some maybe later in the day

So i cant not interfere in this table.. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.