cancel
Showing results for
Did you mean:
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
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..

Super User

@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  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.

9 REPLIES 9
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.

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.

Super User

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

Super User

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.

Super User

@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  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.

Frequent Visitor

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

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..

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:

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

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.

 CustomerID Date of Sale State Total Sales Complete Quarter 1 November 1, 2021 NY \$10 FALSE 2 October 1, 2021 NY \$20 FALSE 3 September 1, 2021 CA \$3 TRUE 4 August 1, 2021 WI \$5 TRUE 5 July 1, 2021 TN \$7 TRUE

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.

Announcements

#### The Power BI Community Show

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

#### Ted's Dev Camp - July 28, 2022

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

#### 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