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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Vnidias
Regular Visitor

Max Date from a store visit

Hello guys i´m with case that i have a date used in modelling of a store.

 

GetImage.png

 

My main problem is i need to create a measure that depends from a max date per month 

 

ex:

 

imagem_2022-11-09_154444346.png

 

For that example in that store, i should have a measure bring me the max date of that visit. In the example 24-10-2022

 

the problem is i cant use a calculated column to solve this situation, i should do using just a measure.

 

Someone could give me a light on this?

 

 

 

 

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @Vnidias ,

 

This is my date table:

vyadongfmsft_0-1668045824845.png

 

Another table:

vyadongfmsft_1-1668045977593.png

 

Relationship between two tables:

vyadongfmsft_2-1668046017313.png

 

Create a measure:

Measure = CALCULATE(MAX('Date'[Date]),FILTER(ALL('Table'),'Table'[Attribute] = SELECTEDVALUE('Table'[Attribute])))

 

You will get the max date of that visit

vyadongfmsft_3-1668046094387.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Vnidias
Regular Visitor

Guys thanks for the help!

wdx223_Daniel
Super User
Super User

Measure=CALCULATE(MAX(FactTable[Date]),ALLEXCEPT(FactTable,Factable[StoreID]))

v-yadongf-msft
Community Support
Community Support

Hi @Vnidias ,

 

This is my date table:

vyadongfmsft_0-1668045824845.png

 

Another table:

vyadongfmsft_1-1668045977593.png

 

Relationship between two tables:

vyadongfmsft_2-1668046017313.png

 

Create a measure:

Measure = CALCULATE(MAX('Date'[Date]),FILTER(ALL('Table'),'Table'[Attribute] = SELECTEDVALUE('Table'[Attribute])))

 

You will get the max date of that visit

vyadongfmsft_3-1668046094387.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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