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

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

Reply
Anonymous
Not applicable

CALCULATE a SUM with FILTER

Hi everyone,

 

I have been trying the whole day to sum a column applying some filter on it. I got the first formula that I'm using the value of a slicer in a condition with a lookup to get the correct date format, and then another simple condition.

 

CALCULATE( 

SUM( GRC_F_KPI[KPI_VALUE] );
FILTER( GRC_F_KPI; GRC_F_KPI[DATE] = LOOKUPVALUE(GRC_F_KPI[DATE]; Test_Period[MONTHOFYEAR]; ALLSELECTED(Test_Period[MONTHOFYEAR])) && GRC_F_KPI[COD_KPI] = "CB-11")
)

 

To this value I would like to deduct the month before value. In order to get that I'm using this formula but it does't work.

 

CALCULATE( 

SUM( GRC_F_KPI[KPI_VALUE] );
FILTER( GRC_F_KPI; GRC_F_KPI[DATE] = EDATE ( LOOKUPVALUE( GRC_F_KPI[DATE]; Test_Period[MONTHOFYEAR]; ALLSELECTED(Test_Period[MONTHOFYEAR] ) ); -1) && GRC_F_KPI[COD_KPI] = "CB-11")
)

 

Thanks for your help.

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

Kindly share your sample data and excepted result to me.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Eventually, it was a filter problem. Thanks anyway.

Hi @Anonymous,

 

Kindly mark your answer as solution to close the case please. thanks in advance.

 

Regards.

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.