Forum Discussion
Using values from a Visual filter in a measure
- 5 years ago
I apologize for the misplaced " in the formula.
Before you create the date column, click on Month, change the data type to text. Same thing goes to year. Then, you create the date column, after that, change the data type of the date column to date.
If that's the case, I would use Power Query to insert months into your data.
Go to Power Query > Add Custom Column > Enter the formula: {1..12}
When the column is created, click the double arrow and choose Expand to New Rows
After that, you can either add a new column using Power Query or in DAX for your columns, e.g. Monthly Apple = [Apple]/12
This will give you the amount for each month.
You now have your month numbers that you can use to filter. If you wish to convert your month number into month name, please refer to the link below.
https://stackoverflow.com/questions/42964605/how-to-get-month-name-from-month-number-in-power-bi
If you wish to convert month number into Quarter number, use the following formula:
Quarter = "Q" & ROUNDUP('Table'[Month]/3,0)
Hi darentengmfs
Thanks for answers.
So i did what you said. Here is my how my Table look like atm.
I also connected the month and year to my date table
Why does my Sum of AHT GrĂ¼n not show only the Sum of 1st quarter? It's showes the whole year.