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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.