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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
JSteele
Regular Visitor

Time Matrix Using Only Month

Hello,

 

I am trying to create a calendar to visualise fruit seasons. I have created mock up in excel to show what I'm trying to achieve:

JSteele_0-1651703318596.png

I am a PowerBI newbie and am having trouble achieving this in PowerBI. For reference, the finished product will be more detailed than this with numerous commodities, countries, and fruit activities, so it needs to be in PowerBI to make use of filters, slicers, etc.

 

The main issue I'm having is that I don't want/need to include years in the data as it repeats each year. Adding data with years is leading to issues with seasons that run over the start of the year (e.g. november to february). In these situations I'd like the chart to show a bar from jan to feb and another bar from nov to dec. 

 

Hope this makes sense, any feedback on how to best achieve this is much appreciated.

Thanks!

11 REPLIES 11
v-easonf-msft
Community Support
Community Support

Hi, @JSteele 

If your field has a hierarchy, then in the matrix you should be able to place your date field as follows to keep only the hierarchy 'month'.

veasonfmsft_0-1652175443801.png

You could also try creating a column 'Month' and applying it to the matrix 'Columns'.

Month = FORMAT(Table1[Date],"MMMM")

 

Best Regards,
Community Support Team _ Eason

Hi @v-easonf-msft 

 

Thank you for your help, I think I've sorted my month problem now 🙂

 

I have ran into another issue if you are able to help with that too.

I am trying to write an if statement to identify if a season runs in a month, with the idea being if it does it returns a 1, and if it doesn't it returns a 0, so I can then conditional format my matrix to create the line visuals. 

JSteele_0-1652227601091.png

My current statement clearly isn't working, but I'm not sure how to correct it/if what I'm trying to achieve is possible.

 

Any help would be much appreciated.

Thanks!

Hi @JSteele ,

 

You can write a measure similar to below to identify whether a season runs in a month but without knowing how your data model looks and a sample data, this may  not work:

In Season =
IF (
    CALCULATE (
        DISTINCTCOUNT ( Table[Column] ),
        ALLEXCEPT ( Date, Date[Month Number] )
    ) > 1,
    0,
    1
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian Thanks for your response.

My model contains a start and end date for each season as shown below. 

JSteele_0-1652237702019.png

Is the measure you suggested still applicable?

 

Thanks

 

Hi @JSteele ,
Several questions:

  • How is your data related to your Date table? I don't see any month number column on your screenshot. Is there an existing relationship between the two?
  • Which table and column do you use for the month name in your matrix?

With just your current data, what I can suggest is to create a calculated column to calculate the number of months from start to end.  Jan 31, 2021 and Feb 1, 2022 will be considered two months.  Here's a sample:

Diff = 
DATEDIFF ( 'Date'[Start], 'Date'[End] + 1, MONTH )
//+1 to compute for the total number of days from start to end

 If you're going to use this in a matrix and there are more than one instance of the field in the matrix row, create a measure MAX (Date[Diff]). Change the table and column names accordingly.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian 

 

1. I have a seperate date table that includes the month number and have created a relationship between that and my seasons data table

2. For the month name I'm using the month column from my date table with a date hierachy in place

 

Hi @JSteele ,

How is your date table linked to the seasons table? What columns link between the two (please show a screenshot of the relationship view)? Please post a sample data that we can just copy-paste instead of just a screenshot.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/2500104#M8890...





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian 

Current relationship:

JSteele_0-1652242710208.png

Sample data:

CountryRegionHemisphereCommodityActivityStart dateEnd date
US - PNWNAMNorthApplePicking8/111/30
US - CANAMNorthApplePicking7/110/31
US - EastNAMNorthApplePicking7/110/31
ChileLATAMSouthApplePicking2/15/31
PolandEuropeNorthApplePicking8/110/31
TurkeyEuropeNorthApplePicking8/110/31
IranEuropeNorthApplePicking8/110/31
ItalyEuropeNorthApplePicking8/110/31
FranceEuropeNorthApplePicking8/110/31
RussiaEuropeNorthApplePicking8/110/31
ChinaAsiaNorthApplePicking7/110/31
IndiaAsiaNorthApplePicking6/19/30
AustraliaOceaniaSouthApplePicking1/13/31
New ZealandOceaniaSouthApplePicking2/14/30

 

hI @JSteele,

Based on your data, there are two possible approaches I can think of: using SUMX if country repeats and MAX if otherwise. Please refer to this pbix:  https://drive.google.com/file/d/1Lo65qeC3k1349D2QbWhirdInmYdeoo29/view?usp=sharing 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks @danextian!

 

Sorry if I'm being dumb here, but if those solutions produces a 1 on the month when a season starts, how do I go about making it so that a 1 is shown for every month that it's in season? E.g. Australia would show 1s for Jan and Feb.

amitchandak
Super User
Super User

@JSteele , The problem with usch idea is that without year, the data from nov to feb will shown in two split jan-feb and Nov-dec .

So the best idea is to use Month Year column or year and month columns.

 

I also check you can not sort month on month year, so that month can repeat without year

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.