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
Py0809
Frequent Visitor

How to generate a table with dynamic starting month

Hi,

 

I have monthly data with different starting month as shown below:

Py0809_0-1660035089613.png

The starting month depends on which cycle it belongs to. For e.g. when we are looking at Apr cycle, the starting month will be April with a 12-months period cycle. 

 

Now, I would like to combine all these tables with different starting month into one table so that I can use it to display my data in table visual in Power BI. 

 

How should I generate a table that can capture the demand & supply for different cycle? Thanks. 

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

Hi @Py0809 ,

 

Is that you want something like this gif shows?

vchenwuzmsft_0-1660803127344.gif

If yes, please create an indepened date table for this slicer and subscribe the measure in the value of martix table.

 

Measure:

Measure =
VAR _s =
    MIN ( 'slicer table'[Date] )
VAR _e =
    DATE ( YEAR ( _s ) + 1, MONTH ( _s ), 1 ) - 1
RETURN
    CALCULATE (
        SUM ( Facttable[VALUES] ),
        FILTER ( 'Facttable', [Date] >= _s && [Date] <= _e )
    )

 

Pbix file in the end which you can refer.

 

Best Regards

Community Support Team _ chenwu zhu

 

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-chenwuz-msft
Community Support
Community Support

Hi @Py0809 ,

 

Is that you want something like this gif shows?

vchenwuzmsft_0-1660803127344.gif

If yes, please create an indepened date table for this slicer and subscribe the measure in the value of martix table.

 

Measure:

Measure =
VAR _s =
    MIN ( 'slicer table'[Date] )
VAR _e =
    DATE ( YEAR ( _s ) + 1, MONTH ( _s ), 1 ) - 1
RETURN
    CALCULATE (
        SUM ( Facttable[VALUES] ),
        FILTER ( 'Facttable', [Date] >= _s && [Date] <= _e )
    )

 

Pbix file in the end which you can refer.

 

Best Regards

Community Support Team _ chenwu zhu

 

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.