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
kb177
Helper II
Helper II

dates not showing correctly in matrix

hello, 

 

my data has dates only for 3 days jan 1,2,and 3rd but when i'm adding the date hirerarchy in matrix its showing for all months

my goal is to get the first date when the value is not blank for the code

value column includes the value for the code 

kb177_1-1688643841163.png

 

 

kb177_0-1688643684520.png

 

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

Hi @kb177 ,

 

I think [Month] column should come from a Calendar table.

Here I create a sample to have a test.

vrzhoumsft_0-1688972214758.png

vrzhoumsft_1-1688972234190.png

Measure:

me = CALCULATE(MIN('test'[Date]),NOT(ISBLANK('test'[Value])),ALLEXCEPT('test','test'[Code],'Calendar'[Month]))

Result is as below.

vrzhoumsft_2-1688972260577.png

 

Best Regards,
Rico Zhou

 

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

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @kb177 ,

 

I think [Month] column should come from a Calendar table.

Here I create a sample to have a test.

vrzhoumsft_0-1688972214758.png

vrzhoumsft_1-1688972234190.png

Measure:

me = CALCULATE(MIN('test'[Date]),NOT(ISBLANK('test'[Value])),ALLEXCEPT('test','test'[Code],'Calendar'[Month]))

Result is as below.

vrzhoumsft_2-1688972260577.png

 

Best Regards,
Rico Zhou

 

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

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.