Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I've got an Excel spreadsheet with Dates and values associated with each dates,
I'm trying to make a graph that can compare the sum of the values from June 21st 2018 to June 21st 2019 to the sum of the values between June 21st 2019 to June 21st 2020.
Is it possible ?
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
I'm not sure what your table structure looks like and what kind of output visual you want.
I'd like to suggest you to create some Meaures as below.
sum2019 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2018,6,21)&&'Table'[date]<DATE(2019,6,21)))
sum2020 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2019,6,21)&&'Table'[date]<DATE(2020,6,21)))
Result would be shown as below.
If i misunderstood your meaning, please share some sample data and expected result to us if you don't have any Confidential Information.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
A more dynamic (future-proof) solution would be adding a custom column on the table that contains your dates. Lets assume the name of that table is 'table' and the column that contains dates is 'date'. Then the DAX should look something like this:
=if(month('table'[date])<6,year(date),if(month('table'[date])=6 && day('table'[date])<21,year(date),year(date)+1))
Then you can use this column to filter your data. Should give the categorisation you desire.
Hi @Anonymous ,
I'm not sure what your table structure looks like and what kind of output visual you want.
I'd like to suggest you to create some Meaures as below.
sum2019 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2018,6,21)&&'Table'[date]<DATE(2019,6,21)))
sum2020 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2019,6,21)&&'Table'[date]<DATE(2020,6,21)))
Result would be shown as below.
If i misunderstood your meaning, please share some sample data and expected result to us if you don't have any Confidential Information.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
50 | |
32 | |
27 | |
26 | |
25 |
User | Count |
---|---|
62 | |
49 | |
29 | |
24 | |
23 |