Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I was able to make a measure that shows the sum of a total for previous week, but however I want to utilize the percent column into it's own column so I can use the slicer for percent change. Any way of doing a new measure column of previous week totals?
Solved! Go to Solution.
I figured it out!!
Lasts Week Total = var LastWeekComp = SUMX( FILTER( Sheet1, Sheet1[Date] = EARLIER(Sheet1[Date]) - 7 ) , Sheet1[Total]) return LastWeekComp
Hi @weixiangzhang ,
I'm not so clear for your description, can you please share some sample data with expected result to help us clarify your requirement?
If you mean display the percent of current sales, you can try to use following measure formula:
Percent = VAR currDate = MAX ( Table[Date] ) RETURN DIVIDE ( SUM ( Table[Amount] ), CALCULATE ( SUM ( Table[Amount] ), FILTER ( ALLSELECTED ( Table ), [Date] = DATE ( YEAR ( currDate ), MONTH ( currDate ), DAY ( currDate ) - 7 ) ), VALUES ( Table[Category] ) ), -1 )
Regards,
Xiaoxin Sheng
I figured it out!!
Lasts Week Total = var LastWeekComp = SUMX( FILTER( Sheet1, Sheet1[Date] = EARLIER(Sheet1[Date]) - 7 ) , Sheet1[Total]) return LastWeekComp
Thank you! I understand how to make a measure, the issue is that I can't convert that to a column. I want to be able to convert it to a column so I can use it as a filter.
Hi @weixiangzhang ,
Can you please share a pbix file with some sample data to test?
Regards,
Xiaoxin Sheng
Yes, this is what I would like to do.
I would like to turn Last Week's Value as a column rather than a measure, so I can use a slicer on it. Is that possible?
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |