cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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:

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

1 ACCEPTED SOLUTION
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:

Under Shapes tab:

Result:

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.

4 REPLIES 4
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())

Helper III

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?

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:

Under Shapes tab:

Result:

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.

Helper III

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]))

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

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

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors