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
Arul
Super User
Super User

NEXT 30 days

Hi,

How can i calculate next 30 days data in calendar. For example today's date is (12/14/2019)+29 days in calendar table with day name as a column and date and data inside the calendar visual week wise.

 

Thanks,

-Arul 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


6 REPLIES 6

Hi @Arul ,

 

you mean this?

 

Calendar =
SELECTCOLUMNS (
    CALENDAR ( TODAY (); TODAY () + 29 );
    "Date"; [Date];
    "Day"; FORMAT ( [Date]; "dddd" );
    "Week"; FORMAT ( [Date]; "yyyy ww" )
)

 

 

...this calendar includes pretty much everything.

https://www.sqlbi.com/articles/reference-date-table-in-dax-and-power-bi/

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


amitchandak
Super User
Super User

Try

Sales 30 Days = ( 
VAR _Cuur_start = Max('Compare Date'[Compare Date]) 
VAR _Curr_END = Max('Compare Date'[Compare Date])+29
return 
calculate((sum(Sales[Sales Amount])),Sales[Sales Date] >= _Cuur_start && Sales[Sales Date] <=  _Curr_END )
)
az38
Community Champion
Community Champion

Hi @Arul 

not sure how do you wanna store and visualize this but maybe try a simple calculated column like

Column = if(datediff(TODAY();'Calendar'[Date];DAY)<=29;TRUE();FALSE())

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38  @mwegener @amitchandak 

Is there any visual like calendar visual to show the data for the next 30 days irrespective of the month. In my case calendar visual will not fulfill the requirement.

 

Thanks,

-Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Hi @Arul ,

 

has your question been answered?

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @Arul ,

 

what kind of data do you want to display.

You could e.g. use a "clustered column chart". Put the date on the axis and filter it with a relative filter for the next 30 days.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.