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
Anonymous
Not applicable

Getting date values in measure for each row

Hello Everyone!!
Can anyone please tell me how to get date value for each row of table in a measure with some filters?

Thanks

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Each row in case measure measure you have display as each row or force calculation from each low

 

like

Sumx(Values(Table[ID]),[Measure])

This forcing to calculation to happen from ID level

 

Between two tables

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451

Anonymous
Not applicable

@amitchandak my scenerio is a little bit different. I am selecting a date from slicer which is the end date of each month and i want to subtract that date to each row of its connected accumlative fact table date coloumn.
How can I achive this? 
thanks for your help and for your reply

Hi @Anonymous ,

Looks like you want to get the day diff between the slicer date and fact date, you can create a measure like this:

Result date =
DATEDIFF (
    SELECTEDVALUE ( 'Fact date'[date] ),
    SELECTEDVALUE ( 'Date'[date] ),
    DAY
)

diff.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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.