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
ph
Helper I
Helper I

DAX - get value from measure

Hi all,

I am beginner and I was wondering if somebody can help me with following problem

 

I have measure (Amount) that is for each date different, and I want get actual value for today..

logically I thought that FILTER should solve my problem, but it does not works for measures (any idea why?) Which function/code can be accurate?

 

current status is that measure returns only SUM of all values, instead of last single value 

I haven t knowledge/skill to rewrite measure

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

Sure. Since you already have a measure for [Amount], you can just calculate it with a new context. 

AmountToday = CALCULATE( [Amount], Table[Date] = TODAY())

 

If this doesn't work, can you share your current code for [Amount]?

View solution in original post

4 REPLIES 4
Cmcmahan
Resident Rockstar
Resident Rockstar

Sure. Since you already have a measure for [Amount], you can just calculate it with a new context. 

AmountToday = CALCULATE( [Amount], Table[Date] = TODAY())

 

If this doesn't work, can you share your current code for [Amount]?

Anonymous
Not applicable

Without knowing your model no answer is possible.

 

Best

Darek

Hi Darek,

what exactly should I fill in?

I need to get one value from one table based on the filter from another table, and I did not found any function for it (or take last value in the column (sorted by date))

Anonymous
Not applicable

You say "I want to get one value from one table based on a filter from another table (or take last value in the column (sorted by date))." Your statement is about as clear as mud.

 

Sorry. With this level of detail, I can't do much even if I wanted 😞

 

For instance, do you really want to get one value from some column when there is a filter on a different table? What if there are many values that the filter makes visible? Do you then want the MAX, the MIN of the values? You also say "take last value in the column." That would point to some kind of MAX or MIN... but then sorted by date - descending? Ascending? There are many more questions... but let's stop here.

 

When you ask questions, it would really be good---and you'll do yourself a big favor---if you could be precise. Otherwise, you risk not getting any answers because people should not have to decipher and make guesses about what it is you wanted to do... They should know exactly what you want(ed) to do.

 

Best

Darek

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.

Top Solution Authors