Forum Discussion
Pipeline value - SUMIF between Dates
Hey there,
i have a table with a deal, the worth, create-date and close date. In order to create a line diagramm of our pipeline-worth i wanted to create a new column in my dates table with following DAX-Function:
Hi, fheller98
Try measure as below:
Pipeline Worth = VAR date1 = Datumstabelle[Date] VAR tab = FILTER ( Deals, Deals[CreateDate] < date1 && Deals[CloseDate] > date1 ) RETURN SUMX ( tab, Deals[Worth] )+0Notice to change the format of the measure.
The result will show as below:
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
12 Replies
- amitchandak
Super User
fheller98 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
If you are looking for an active deal, close and created a deal trend refer to blog on similar topic
- fheller98
Helper I
Hey amitchandak,
thanks for your fast response. Below you will find the two tables. In addition i created a "solution" table due to the fact, that i know how to create it in excel.
Date month calenderweek year 01.01.2021 1 1 2021 02.01.2021 1 1 2021 03.01.2021 1 1 2021 04.01.2021 1 2 2021 05.01.2021 1 2 2021 06.01.2021 1 2 2021 07.01.2021 1 2 2021 08.01.2021 1 2 2021 09.01.2021 1 2 2021 10.01.2021 1 2 2021 11.01.2021 1 3 2021 12.01.2021 1 3 2021 13.01.2021 1 3 2021 14.01.2021 1 3 2021 15.01.2021 1 3 2021 16.01.2021 1 3 2021 17.01.2021 1 3 2021 18.01.2021 1 4 2021 19.01.2021 1 4 2021 20.01.2021 1 4 2021 21.01.2021 1 4 2021 22.01.2021 1 4 2021 23.01.2021 1 4 2021 24.01.2021 1 4 2021 25.01.2021 1 5 2021 26.01.2021 1 5 2021 27.01.2021 1 5 2021 28.01.2021 1 5 2021 29.01.2021 1 5 2021 30.01.2021 1 5 2021 31.01.2021 1 5 2021 Deal-ID Worth Create-Date Close-Date 123 100,00 € 03.01.2021 06.01.2021 124 110,00 € 04.01.2021 07.01.2021 125 120,00 € 05.01.2021 08.01.2021 126 130,00 € 06.01.2021 09.01.2021 127 140,00 € 07.01.2021 10.01.2021 128 150,00 € 08.01.2021 11.01.2021 129 160,00 € 09.01.2021 14.01.2021 130 170,00 € 10.01.2021 15.01.2021 131 180,00 € 11.01.2021 16.01.2021 132 190,00 € 12.01.2021 17.01.2021 133 200,00 € 13.01.2021 18.01.2021 134 210,00 € 14.01.2021 19.01.2021 135 220,00 € 15.01.2021 17.01.2021 136 230,00 € 16.01.2021 18.01.2021 137 240,00 € 17.01.2021 19.01.2021 138 250,00 € 18.01.2021 20.01.2021 139 260,00 € 19.01.2021 21.01.2021 140 270,00 € 20.01.2021 22.01.2021 Date month calenderweek year Pipeline_worth 01.01.2021 1 1 2021 0 02.01.2021 1 1 2021 0 03.01.2021 1 1 2021 0 04.01.2021 1 2 2021 100 05.01.2021 1 2 2021 210 06.01.2021 1 2 2021 230 07.01.2021 1 2 2021 250 08.01.2021 1 2 2021 270 09.01.2021 1 2 2021 290 10.01.2021 1 2 2021 310 11.01.2021 1 3 2021 330 12.01.2021 1 3 2021 510 13.01.2021 1 3 2021 700 14.01.2021 1 3 2021 740 15.01.2021 1 3 2021 780 16.01.2021 1 3 2021 820 17.01.2021 1 3 2021 640 18.01.2021 1 4 2021 450 19.01.2021 1 4 2021 250 20.01.2021 1 4 2021 260 21.01.2021 1 4 2021 270 22.01.2021 1 4 2021 0 23.01.2021 1 4 2021 0 24.01.2021 1 4 2021 0 25.01.2021 1 5 2021 0 26.01.2021 1 5 2021 0 27.01.2021 1 5 2021 0 28.01.2021 1 5 2021 0 29.01.2021 1 5 2021 0 30.01.2021 1 5 2021 0 31.01.2021 1 5 2021 0 - v-easonf-msft
Community Support
Hi, fheller98
Try measure as below:
Pipeline Worth = VAR date1 = Datumstabelle[Date] VAR tab = FILTER ( Deals, Deals[CreateDate] < date1 && Deals[CloseDate] > date1 ) RETURN SUMX ( tab, Deals[Worth] )+0Notice to change the format of the measure.
The result will show as below:
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
- fheller98
Helper I
That worked perfectly. The only thing is, that this pipeline value is not filtering for mainly set filter.
F.e. the pipeline deals is matched to an supervisor and therefore the pipeline value per supervisor would be very helpful to know.
The Deals are matched to the supervisor and worth in one table but if i set the supervisor filter it is not changing the pipeline value.I know that we add && Deals[Supervisor] = "ljnas" to this:
FILTER ( Deals, Deals[CreateDate] < date1 && Deals[CloseDate] > date1 )
but we want a dynamic solution.
Thanks for your help and greets
Finn
- v-easonf-msft
Community Support
Hi, fheller98
The value of calculated column will not be affected by the slicer. If you want to get dynamic values, you should try measure.
e.g.
Pipeline Worth2 = VAR date1 = SELECTEDVALUE( Datumstabelle[Date]) VAR tab = FILTER ( Deals, Deals[CreateDate] < date1 && Deals[CloseDate] > date1&& Deals[Supervisor] IN VALUES(Deals[Supervisor])) RETURN SUMX ( tab, Deals[Worth] )+0Please check my sample file. If I misunderstood , please let me know.
Best Regards,
Community Support Team _ Eason- fheller98
Helper I
Hey v-easonf-msft ,
that is exactly what i meant but it's not working in my powerBI sheet. I tried to remove one of the filter but it is not working either, so i guess it has something to do with the SelectedValue function. The 'All Deals' Created date variable is connected to the Date-variable. I think that is the "mistake" - do you have any solution for this?Thanks and greets from germany
Finn