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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
koray
Helper V
Helper V

Dax measure to show value of yesterday's

Hello,

 

I think i have a simple question.

The measure I want to write is to bring the number in the Work Days column in the table below according to yesterday.
I can do this with filter, but I need the dax code because I will use the result later in the divide process.

koray_1-1622098398203.png

Since today is May 27, result should be I want to get is 14.

 

Thank you for help.

2 ACCEPTED SOLUTIONS

Hi, @koray 

Thank you for your feedback.

Do you want to see only yesterday's value in a card visualization?

Please check the below.

 

Picture2.png

 

Work days Yesterday's value =
CALCULATE( [Work days Current], 'Table'[Date] = TODAY()-1)
 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

Hi, @koray 

Thank you for your feedback.

Please check the link down below.

 

Picture1.png

 

Highest Number for the current month =
VAR currentmonth =
EOMONTH ( TODAY (), 0 )
RETURN
MAXX (
FILTER ( ALL ( 'Table' ), EOMONTH ( 'Table'[Date], 0 ) = currentmonth ),
[Work days Current]
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

7 REPLIES 7
Jihwan_Kim
Super User
Super User

Hi @koray 

 

Please check the below picture and the sample pbix file's link down below.

 

Picture1.png

 

Work days previous date =
CALCULATE( [Work days Current], DATEADD( 'Table'[Date], -1,DAY))
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hi @Jihwan_Kim 

 

Thank you for help.

 

It works correctly in the table display, but does not return the correct result in the card display. That's why I can't use this result in the next divide process.

 

koray_0-1622101111408.png

 

Hi, @koray 

Thank you for your feedback.

Do you want to see only yesterday's value in a card visualization?

Please check the below.

 

Picture2.png

 

Work days Yesterday's value =
CALCULATE( [Work days Current], 'Table'[Date] = TODAY()-1)
 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@Jihwan_Kim Can i ask one more question 😞

How can I show the highest number of work days for the current month on the card.

koray_0-1622105574859.png

 



Hi, @koray 

Thank you for your feedback.

Please check the link down below.

 

Picture1.png

 

Highest Number for the current month =
VAR currentmonth =
EOMONTH ( TODAY (), 0 )
RETURN
MAXX (
FILTER ( ALL ( 'Table' ), EOMONTH ( 'Table'[Date], 0 ) = currentmonth ),
[Work days Current]
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


This also worked 🙂 Thank you @Jihwan_Kim 

It worked, thank you so much 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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