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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Super User
Super User

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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