Forum Discussion
Powerbi: Need column difference based on slicer selection by user
- 1 year ago
Hi ankurbajaj07,
Can you update below DAX query and try one?
difference =
CALCULATE (
SUM ( BI_ALLOCEFFORT_DATA[ST_CLGBAL] )
- SUM ( BI_ALLOCEFFORT_DATA[ST_PREVCLGBAL] ),
KEEPFILTERS ( BI_ALLOCEFFORT_DATA[REVDATE] )
)Thanks,
Prashanth
Hi ankurbajaj07
Query 1: The slicer is showing correct dates. Why would it go back to 2019 whe you've selected FY20? The dates selected match the fiscal quarter and year in your calendar?
Query2: You can create a measure that calculated the difference between the sum of the two columns:
difference =
SUM ( BI_ALLOCEFFORT_DATA[ST_CLGBAL] )
- SUM ( BI_ALLOCEFFORT_DATA[ST_PREVCLGBAL] )
Hi , thanks for the reply.
Query 2: this measure is summing up ST_CLGBAL for all the instances of job (Rev0 , Rev1...) once the job is filtered based on REVDATE lying within slicer range. i.e. it is clearing the slicer filter for summing up ST_CLGBAL once the job is selected based on slicer range. However, I need ST_CLGBAL for only that job instances which lies within the slicer range. i.e. ST_CLGBAL should be from the selected slicer range only corresponding to the job which is filtered from slicer range.