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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.