Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi community,
I'm having the following case:
For example, in a date Slicer, I select the period 10/01/2019 - 12/01/2019 . Then, I need to display a bar chart with same
period selected for all years of my dataset.
Example:
I have this data set:
Year | Month | Total |
2018 | jan | 50 |
2018 | fev | 22 |
2018 | mar | 11 |
2018 | abr | 16 |
2018 | mai | 23 |
2018 | jun | 32 |
2018 | jul | 25 |
2018 | ago | 11 |
2018 | set | 554 |
2018 | out | 5 |
2018 | nov | 10 |
2018 | dez | 15 |
2019 | jan | 12 |
2019 | fev | 21 |
2019 | mar | 19 |
2019 | abr | 27 |
2019 | mai | 226 |
2019 | jun | 222 |
2019 | jul | 33 |
2019 | ago | 24 |
2019 | set | 99 |
2019 | out | 10 |
2019 | nov | 10 |
2019 | dez | 20 |
I need that my result be like the image below:
The Slicer need be a slider format.
Solved! Go to Solution.
Hi @Wilianfilho_ps - believe it or not, you do not need any measures for this. You can use an Implict Measure by just dragging in the field, but it does require some creative modeling, and it has one assumption, below:
Here is a link to my PBIX file that you can look at. It is easier when you can see the tables, the model, and the source Power Query data.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@Wilianfilho_ps - I'm marking this as solved. I hope it helped. If not, please reply back and let us know.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @Wilianfilho_ps - believe it or not, you do not need any measures for this. You can use an Implict Measure by just dragging in the field, but it does require some creative modeling, and it has one assumption, below:
Here is a link to my PBIX file that you can look at. It is easier when you can see the tables, the model, and the source Power Query data.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@Wilianfilho_ps - have you had a chance to review either of these solutions? If you always have just 2 years of data, @amitchandak's time intelligence is a bit easier to understand and will work.
If you have multiple years, my model change will compensate for that but needs a little more setup to work.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@Wilianfilho_ps , With a date table, You can use Trailing year measure
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
or you can use SAMEPERIODLASTYEAR
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
26 | |
22 | |
13 | |
8 |
User | Count |
---|---|
73 | |
51 | |
45 | |
16 | |
12 |