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

Take a end of month snapshot

Hello to all

 

I have a state transitont table like this one:

id   Tid  StartDate  EndDate   PreviousState  State

1     1   1/2/2018   25/2/2018         A                 B

2     1   26/2/2018   25/3/2018       B                 C

3     2   1/2/2018   25/3/2018         A                 B

4     3   31/1/2018   25/2/2018       A                 B

5     3   25/2/2018   27/2/2018       B                 C

6     3  27/2/2018   3/3/2018          C                 D

7     4   1/2/2018   25/2/2018         A                 B

8     4   25/2/2018   28/2/2018       B                 C

9     5   1/2/2018   25/3/2018         A                 B

10   5   26/3/2018   28/3/2018       B                 C

 

But I need to have a picture by state in each end of month (Start date>End of month and End date > end of month):

31/1/2018

 

4     3   31/1/2018   25/2/2018       A                 B

28/2/2018

2     1   26/2/2018   25/3/2018       B                 C

3     2   1/2/2018   25/3/2018         A                 B

6     3  27/2/2018   3/3/2018          C                 D

8     4   25/2/2018   28/2/2018       B                 C

9     5   1/2/2018   25/3/2018         A                 B

31/3/2018

none in this case

 

How can I do it?

 

I created a calendar table with only end of month.

 

But now I'm stuck... 

 

A new table using comparing the dates?

 

Thanks

 

 

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous

 

You may use  CROSSJOIN Function to get the table as requested.

Table =
FILTER (
    CROSSJOIN ( 'Calendar', Table1 ),
    Table1[StartDate] <= 'Calendar'[EndofMonth]
        && Table1[EndDate] >= 'Calendar'[EndofMonth]
)

1.png

Regards,

Cherie

 

Community Support Team _ Cherie Chen
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-cherch-msft
Employee
Employee

Hi @Anonymous

 

You may use  CROSSJOIN Function to get the table as requested.

Table =
FILTER (
    CROSSJOIN ( 'Calendar', Table1 ),
    Table1[StartDate] <= 'Calendar'[EndofMonth]
        && Table1[EndDate] >= 'Calendar'[EndofMonth]
)

1.png

Regards,

Cherie

 

Community Support Team _ Cherie Chen
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.

Top Solution Authors