Forum Discussion
iozkan
8 years agoRegular Visitor
Defining basis month or year and comparing
Hi guys, I have a table of sales figures with dates (monthly, quarterly, yearly) and I'd like to choose a basis month or year (which will be 100 and should change according to selected month or y...
- 8 years ago
Bascially I have used a New Table of Dates to slice the original Table
A New Table (Calculated Table) was created from the Modeling Tab>>> NEW TABLE
New_Table = ALL ( TableName[Date] )
Then following MEASURE was added to Original Table
Index = VAR selectedmonthSales = CALCULATE ( SUM ( TableName[Sales] ), FILTER ( ALL ( TableName ), TableName[Date] = SELECTEDVALUE ( 'New_Table'[Date] ) ) ) RETURN IF ( SELECTEDVALUE ( TableName[Date] ) = SELECTEDVALUE ( 'New_Table'[Date] ), 100, SELECTEDVALUE ( TableName[Sales] ) * 100 / selectedmonthSales ) - 8 years ago
Using Slicer from New Table, now you can get the required Index Measure in your Original Table
Zubair_Muhammad
Community Champion
8 years agoiozkan
8 years agoRegular Visitor
Yes, in the new table.
- Zubair_Muhammad8 years ago
Community Champion
- Zubair_Muhammad8 years ago
Community Champion
In Excel you can simply copy the Dates Column from your Original table and paste it as NEW TABLE and then Add it to the DATA MODEL.
See the Excel file I attached above
- iozkan8 years agoRegular Visitor
Hi,
Yes I've copied the date from sales table and copied to a new sheet, added this table to the data model. When I try to add date column in pivot table below error pops up