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.
Trying to build a simple bar chart say Sales by months.
Any advice on the best practice to implement this?
You should be able to use a technique similar to:
DaysPast = DATEDIFF([Date],TODAY(),DAY)
DATEDIFF will also take "MONTH" in the last parameter. Then you can just set the filter to something like DaysPast > 30 days or 12 months for example.
I am tackling a similar scenario but for some reason, I am having some problem and I am not able to figure out the solution
In a table, I am having a column with the date. I have only 6 months of Date and data in the table.
When I pull the column to a slicer, it shows the first date and last date correctly where as when I pull the date to a table, it lists all the months. Is this a bug?
I want to calculate the number of months I have selected, but the measure always ends up showing 12 instead of 6.
The measure I am using is
CountOfMonths = DATEDIFF(FIRSTDATE(Table1[SampleDate].[Date]), LASTDATE(Table1[SampleDate].[Date]),MONTH)
Thanks for that. It does work.
The only problem is that it hard coded to be today() which is current day/month. In reality, users want to be able to do from a selected / specified month (EG from a slicer). In the other words, can we do past N months from current SELECTED month instead of current month?
@Anonymous
According to your description, it seems that you're looking for a date range slicer. There's already one official customized The Timeline Slicer.
You can download the visualization and sample from here.
There is a feature request that will enable users to make an offset to time intelligence - please vote if you think it will satisfy your needs.
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |