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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Clout
Helper III
Helper III

Show points/line in a line chart only for a certain time period

Hello,

 

I have two tables:

 

Table [Concentration]

 

Date / Nges

1.1 / 5

2.1 / 10

3.1 / 8

4.1 / 20

 

Table [Global]

 

GW Nges

10

 

So table Global only consists of one row as a limit value

 

 

So now I want to visualise the table Concentration over the time with a line chart and visualise the limit value GW Nges as well. Thats no problem, but I want to visualise the limit value "GW Nges" only for a certain perdiod in the year. From the 01.05 till 01.11.

But not only for one specific year, it should be transferable for every year. So when i visualise the years 2018 to 2021, the limit should be only visible within the certain time period.

 

Id like to have something like that:

Unbenannt.PNG

I think its possible with a DAX measure, but this need exceeds my skills. I appreciate any help.

 

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Clout ,

You can just set the limitations for the month and days in the measure:

Gw Nges =
VAR _date =
    SELECTEDVALUE ( Concentration[Date] )
RETURN
    IF (
        MONTH ( _date ) = 1
            && DAY ( _date ) >= 5
            && DAY ( _date ) <= 11,
        SUM ( 'Global'[GW Nges] )
    )

Use a Line chart and change some settings for it to show the result.

Adjust data color in Data colors tab:

color.png

Under Shapes tab:

Shape.png

Result:

re.png

Attached a sample file in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Clout , Try a measure like

if(max([date]) >=date(2020,05,01) && max([date]) <=date(2020,11,01) , sum(Global[GW Nges]), blank())

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

Hello @amitchandak 

 

thank you, this works for the year 2020. But is it possible to doesn't exclude the other years? So is it possible to dont set a specific year and visualise the limit for the year 2019, 2021 and in the future for 2022, 2023 etc. too?

v-yingjl
Community Support
Community Support

Hi @Clout ,

You can just set the limitations for the month and days in the measure:

Gw Nges =
VAR _date =
    SELECTEDVALUE ( Concentration[Date] )
RETURN
    IF (
        MONTH ( _date ) = 1
            && DAY ( _date ) >= 5
            && DAY ( _date ) <= 11,
        SUM ( 'Global'[GW Nges] )
    )

Use a Line chart and change some settings for it to show the result.

Adjust data color in Data colors tab:

color.png

Under Shapes tab:

Shape.png

Result:

re.png

Attached a sample file in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yingjl 

thank your for your suggestion, it helped me very much to get on the solution!

 

My data format is DD/MM/YYYY, and your suggestion holds only the 1th Month and the the 5th and 11th Day. (I think there was a little misunterstanding between the different data formats, I should hint at it). But I wanted the limit to be visible for the beginning of the  5th Month till the 11th Month.

 

So my solution looks now like this:

 

Gw Nges =
VAR _date =
SELECTEDVALUE ( Frachten[Datum] )
RETURN
IF (
MONTH ( _date ) >= 5 && MONTH( _date) <= 11
&& DAY ( _date ) = 1
 
, MAX('Global'[GW_AblaufNges]))

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.