calculated columns
1 TopicHow to fix Date X Axis?
Hello! To give context I am trying to count the number of transactions done in established periods such as (Actual month or Past month). For this, I used calculated measures: Actual Month = VAR EARLIESTYEAR = YEAR(MAX(Transaccional[Date])) VAR EARLIESTMONTH = MONTH(MAX(Transaccional[Date])) VAR EARLIESTDAY = DAY(MAX(Transaccional[Date])) RETURN CALCULATE(count(Transaccional[TransactionId]), FILTER(Transaccional, YEAR([Date])=EARLIESTYEAR && MONTH([Date])=EARLIESTMONTH && DAY([Date])<=EARLIESTDAY )) Interanual Month = CALCULATE( count(Transaccional[TransactionId]), FILTER(Transaccional, YEAR([Date])=YEAR(MAX([Date]))-1 && MONTH([Date])= MONTH(MAX([Date])) && if(MAX([Date])<>EOMONTH(MAX([Date]),0),Day(Transaccional[Date])<=DAY(MAX([Date])) ,DAY([Date])>=DAY(MAX([Date])) || DAY([Date])<=DAY(MAX([Date]))) )) Previous month = CALCULATE( count(Transaccional[TransactionId]), FILTER(Transaccional, YEAR([Date])=YEAR(MAX([Date])) && MONTH([Date])= MONTH(MAX([Date]))-1 && if(MAX([Date])<>EOMONTH(MAX([Date]),0),Day(Transaccional[Date])<=DAY(MAX([Date])) ,DAY([Date])>=DAY(MAX([Date])) || DAY([Date])<=DAY(MAX([Date]))) )) The purpose of this formula is to make the data visualization dynamic since I want the user to filter the data, and depending on those changes I want the graph to change. I am certain that the formulas work just fine. Still, when I have to graph the measures, the X axis corresponding to the date (specifically DAY), the numbers are wrongly distributed along the X axis. For example: The latest date on this data is (6/19/2024) but the measure shows values up to day 30, which means that the data is not well aligned. I have tried and thought this a lot but don't know what the solution would be.551Views0likes2Comments