Forum Discussion

cleemas's avatar
cleemas
Frequent Visitor
6 years ago

Two same slicer on column

Hello,

 

The office column displays the value from the 'SharePoint List' [Value] that belongs to the filtered month or year (the year and month can be filtered based on month and/or year '2019 January' or 'January' ....... '2015').

 

Slicer1 - value from filter1. Filter1 contains year and month.

Slicer2 - value from filter2. Filter2 contains year and month.

+/- - value after filtering results from filter1 and filter2. The old date value is always deducted from the newer date value.

 

Excel is like:

 

PointerPeriodOffice1Office2Office3Office4
SUM peopleSlicer 1 (Month, Year)2527-20
 Slicer 2 (Month, Year)3017-30
  +/--510--10
SUM people2Slicer 1 (Month, Year)12-516
 Slicer 2 (Month, Year)13-1013
 +/--1--53

 

 

SharePoint List is like:

YearMonthOfficeValue
2016JanuaryOffice110
2017FebruaryOffice117
2019DecemberOffice27
2015FebruaryOffice215
2020JulyOffice330
2016JanuaryOffice325

 

Slicer1 is same like Slicer2

YearMonth
2016January
2017February
2019December
2015February
2020July
2016January

 

Can you advise me how I can do that, please?

 

3 Replies

  • Assuming you are able to create two slicers. By using two disconnected tables or one connected and one disconnected table.

     

    You can try formulas like

     

    slicer 1 value = calculate(sum(table[value]),filter(table,table[month-year] in ALLSELECTED('Slicer1'[Format Month])))
    slicer 2 value = calculate(sum(table[value]),filter(table,table[month-year] in ALLSELECTED('Slicer2'[Format Month])))
    
    OR
    slicer 1 value = calculate(sum(table[value]),table[month-year] in ALLSELECTED('Slicer1'[Format Month]))
    slicer 2 value = calculate(sum(table[value]),table[month-year] in ALLSELECTED('Slicer2'[Format Month]))

     

    Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
    Thanks. My Recent Blog -
    Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
    Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

    Connect on Linkedin

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi cleemas ,

     

    You may combine all the Offices columns into a separate column for the Excel data source. Enter into Query Editor, click on columns Office1-Office4 at the same time, then choose "Unpivot Columns" option, you can rename this result column "Attribute" with "Office" . Don't forget to click the "Close & Apply" button.

    Then you can create measures like DAX to get total value for per Pointer.

     

    Total sum=CALCULATE (SUM (Table1[Value] ),FILTER (ALLSELECTED(Table1), Table1[Pointer]= MAX(Table1[Pointer])))

     

    Best Regards,

    Amy

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • cleemas's avatar
    cleemas
    Frequent Visitor

    I have probably misspoken about what I want. I need to get a table similar to a table in Excel from a SharePoint List.