Forum Discussion

LJAdmin's avatar
LJAdmin
Regular Visitor
6 years ago
Solved

Keep Contest Filter after Caculate with Filter

Hi,

 

i've a measure defined like this:

 

T_QTA_VENDUTA_SP = CALCULATE(SUM(DM_RETAIL_PRODUCTS[QTA_VENDUTO]),FILTER(ALL(DM_RETAIL_PRODUCTS),MAX(DM_RETAIL_PRODUCTS[STAGIONE_VENDITA]) = DM_RETAIL_PRODUCTS[STAGIONE_VENDITA]+10))
 
This allowed my to calculate the qty sold in a previous season:
 

 

The "Previous" term means SEASON - 10.

 

Now, if i want to add another detail level, like the Month, this is what i got:

 

 

The Measure won't split by month, i get the total instead.

Is there a way to use the Caculate function with the filter clause, but in the sametime maintain the context of the table ( or visual)

where the Measure is placed?

 

Thanks in advance for help,

Best Regards

--D

  • Hi LJAdmin ,

     

    Try to modify your measure as below:

     

    T_QTA_VENDUTA_SP = CALCULATE(SUM(DM_RETAIL_PRODUCTS[QTA_VENDUTO]),FILTER(ALL(DM_RETAIL_PRODUCTS),DM_RETAIL_PRODUCTS[STAGIONE_VENDITA]=MAX(DM_RETAIL_PRODUCTS[STAGIONE_VENDITA])+10))

    If the above doesnt work,could you pls upload your .pbix file to onedrive and share the link with us?Remember to remove the confidentail information.

     

     
    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!

     

     

3 Replies