Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Power BI - How to create a custom filter

Hello All,

We have a requirement to compare the data with Overall data. Below is the sample report.

 

We have slicer(s) for Region & Month.

Here we have monthly sales performance for region. It has a column Overall.

Our client requirement is if user select only data for a particular region "USA" then USA & Overall value should come.

e.g. for JAN -  USA - 100% , Overall - 99.03%

Another example -  For JAN If user select India & UK then

India -98.12%, UK - 100, Overall - 99.03%

 

Overall value should be actual overall regardless of filtering the region.

 

Thanks,

PBI V2

  • Anonymous 

     

    im not sure the data you have  , but as an example : 

    if you have sales per country , and you are getting % sales per country, 

    and you want this %sales per country to be stable and dont change with filtering 

     

    you can use the following pattern : 

    divide ( 

    sum(tbl_name[ sales] , 

    calculate  ( sum(tbl_name[ sales] , all ( tbl_name[country_col_name ) ,

    0
    )

     

    let me know if this helps .

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

1 Reply

  • Daniel29195's avatar
    Daniel29195
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    im not sure the data you have  , but as an example : 

    if you have sales per country , and you are getting % sales per country, 

    and you want this %sales per country to be stable and dont change with filtering 

     

    you can use the following pattern : 

    divide ( 

    sum(tbl_name[ sales] , 

    calculate  ( sum(tbl_name[ sales] , all ( tbl_name[country_col_name ) ,

    0
    )

     

    let me know if this helps .

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! πŸ€