User Profile
Thalbish
Frequent Visitor
Joined 2 years ago
User Widgets
Contributions
Last Year Sales Giving In-correct output
I have a date table created with the formula `Date = CALENDAR(MIN('RetailTransactions'[BusinessDate]), TODAY())`, which is connected to my sales table through a one-to-many relationship. When I calculate last year's sales using the following formula: ```DAX Total Sales Line Last Year = ABS(CALCULATE( SUM(RetailTransactionSalesLines[NetAmount]), SAMEPERIODLASTYEAR('Date'[Date]) )) ``` It works correctly when I select a date range from 01-09-24 to 27-09-24, showing accurate figures. However, if I select the range from 01-09-24 to 28-09-24, the calculation for last year shows the entire month rather than limiting it to the same range until the 28th of last year. This issue also occurs with my last year Month-to-Date (MTD) and Year-to-Date (YTD) calculations.Solved660Views2likes5CommentsRe: Multiple Slicers of same type in one graph
Also can you please help me with applying this 2 date into a clustered bar graph which represent order type,i want one colour to represent the first date and another to other date as you have explained for sales As you see in the above example i want one bar two represent delivery another with dine in and another with drive through, the clustered bar, ie;Orange and blue acts like when i set slicer for one date orange adjusts and other slicer adjusts blue,i also wanted to integrate this with our already created slicers1.1KViews0likes0Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.