cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Booyah
Frequent Visitor

Hide incomplete quarters in line chart

I've been struggling with this for hours and cannot seem to figure it out.


My issue is pretty straightforward. I have a line chart that shows data over the previous 4 years. One of the tables used is a financial table that loads data a month or two months behind. As of today, the data is loaded through November 2021. I need to hide 2021 - Q4 from the line chart until December data is loaded in.

 

It needs to be dynamic where I can do it and leave it - without having to come back every month or so to change something.

2 ACCEPTED SOLUTIONS
Whitewater100
Solution Sage
Solution Sage

Hi:

If you can add to your date table an index number for each Quarter. E.G., 

2018 Q 1 = 201801  0r  1

2018Q2 =201802     Or 2

.... 2021Q4 = 202104   or  16

This column is named index in this example

Then add calc cloumn:

Completed Qtr  =

      VAR ThisQtrID =

              LOOKUPVALUE(Dates[Index], Dates[Date], TODAY())

                   RETURN Dates[Index] < ThisQtrID

          //returns TRUE() if the quarter is in the past and complete

            set filter appropriately - set to TRUE //

 

There are other ways of doing it like having a date calendar with offset so 0 is the current quarter, so you filter not to include it. There are date tables available on the internet. If you need more help let me know.

 

Thanks..

View solution in original post

@Booyah It is funny you asked this, I was about to do a video on this in the next few days, maybe I will prioritize it. Subscribe to my youtube channel to stay updated (link below), if you found a solution before that, great.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

9 REPLIES 9
Booyah
Frequent Visitor

I've been struggling with this for hours and cannot seem to figure it out.


My issue is pretty straightforward. I have a line chart that shows data over the previous 4 years. One of the tables used is a financial table that loads data a month or two months behind. As of today, the data is loaded through November 2021. I need to hide 2021 - Q4 from the line chart until December data is loaded in.

 

It needs to be dynamic where I can do it and leave it - without having to come back every month or so to change something.

Booyah
Frequent Visitor

I've been struggling with this for hours and cannot seem to figure it out.


My issue is pretty straightforward. I have a line chart that shows data over the previous 4 years. One of the tables used is a financial table that loads data a month or two months behind. As of today, the data is loaded through November 2021. I need to hide 2021 - Q4 from the line chart until December data is loaded in.

 

It needs to be dynamic where I can do it and leave it - without having to come back every month or so to change something.

How do you know that/when a quarter is complete?

Awesome. Thanks for subscribing. Almost there 🙂






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@Booyah It is funny you asked this, I was about to do a video on this in the next few days, maybe I will prioritize it. Subscribe to my youtube channel to stay updated (link below), if you found a solution before that, great.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Booyah
Frequent Visitor

That would be awesome. Just subscribed to the channel and I look forward to seeing that video!

Whitewater100
Solution Sage
Solution Sage

Hi:

If you can add to your date table an index number for each Quarter. E.G., 

2018 Q 1 = 201801  0r  1

2018Q2 =201802     Or 2

.... 2021Q4 = 202104   or  16

This column is named index in this example

Then add calc cloumn:

Completed Qtr  =

      VAR ThisQtrID =

              LOOKUPVALUE(Dates[Index], Dates[Date], TODAY())

                   RETURN Dates[Index] < ThisQtrID

          //returns TRUE() if the quarter is in the past and complete

            set filter appropriately - set to TRUE //

 

There are other ways of doing it like having a date calendar with offset so 0 is the current quarter, so you filter not to include it. There are date tables available on the internet. If you need more help let me know.

 

Thanks..

VahidDM
Super User
Super User

Hi @Booyah 

 

Can you post sample data as text and expected output?
Not enough information to go on;

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

Booyah
Frequent Visitor

Here is a super brief mock-up of what I want to see as the output. I am showing the total sales across several years 2018-present by each quarter. What I want to be able to do is create a calculated column as 'Complete Quarter' to set months in a quarter to "FALSE" if the quarter is not full.

CustomerIDDate of Sale StateTotal SalesComplete Quarter
1November 1, 2021NY$10FALSE
2October 1, 2021NY$20FALSE
3September 1, 2021CA$3TRUE
4August 1, 2021WI$5TRUE
5July 1, 2021TN$7TRUE


This table is loaded once a month. When it's loaded in, it's always a month behind. So the December 2021 data will not be loaded in until the next week or so.

If I have a calculated column like this, then I can set it to filter that line chart to only show "TRUE" values which will solve my issue of showing an incomplete quarter.

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors