Forum Discussion
andybamber
5 years agoHelper III
Time Intelligence
Hi Group, A question on the Time Intelligence functions... I have a matrix visual, and one of the measures is a month on month change... That I can do, and it works, however the requirement is th...
- 5 years ago
You need to create additional measures fo different granilarity and then create measure with SWITCH function:
GAP_Chg = SWITCH ( TRUE (), ISINSCOPE ( DATE_DIMENSION[Month] ), [GAP_Mom_Chg], ISINSCOPE ( DATE_DIMENSION[Quarter] ), [GAP_QoQ_Chg], ISINSCOPE ( DATE_DIMENSION[Year] ), [GAP_YoY_Chg] )By using this measure in the matrix/chart you can easily change MoM to YoY etc.
_______________
If I helped, please accept the solution and give kudos! 😀
amitchandak
5 years agoSuper User
andybamber , I have part of it created in this blog
Last Period Employee =
var _min_date = minx(all('Date'),'Date'[Date])
var _Expression=if(ISFILTERED('Date'[Month Year]),maxx('Date',DATEADD('Date'[Date],-1,MONTH)),maxx('Date',DATEADD('Date'[Date],-1,YEAR)))
Return
CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=_Expression && Employee[Start Date]>=_min_date && (ISBLANK(Employee[End Date]) || Employee[End Date]>_Expression)),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
check the usage of isfiltered. The same way you can use isinscope
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
also refer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://www.youtube.com/watch?v=vlnx7QUVYME