Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Please help me, I have the requirement to calculate totals for 2 periods, but based on an initial date, for example I have the total for period 1 of a segment 09/01/2022 - 09/30/2022 and the idea is to bring totals automatically corresponding to the period 09/01/2021 - 09/30/2021, apply a measure but this brings me the grand total for all rows
code dax measure
Solved! Go to Solution.
@Hipnobe Thank you very much for your response and collaboration, I had already carried out those tests, however I applied some custom settings and the problem was solved, I leave the solution here in case someone requires it
@Hipnobe Thank you very much for your response and collaboration, I had already carried out those tests, however I applied some custom settings and the problem was solved, I leave the solution here in case someone requires it
Hello,
First, it doesn't look like you have a date table. If not, I recommend you to start creating one.
Then, can you try to make 2 seperate measures: 1 for N and the 2nd one for N-1 (prueba2 in your example).
The measure to compute N:
Toneladas N =
Toneladas N =
SUM(tab_registros[toneladas])
prueba2 =
prueba2 =
CALCULATE ( [Toneladas N], DATEADD ( Date[Date], -1, YEAR ) )
Best of luck!
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
19 | |
15 | |
7 | |
6 |