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, I'm still a newbie in PowerBI and I'm trying to get a data with the use of filters but no data was generated from the formula.
For context, I have a (summarized) table with Month, Year, Type (category column) and Total (measure). I want to add another column where the data is the total measure of the month-past year data.
For example:
My current formula is:
Solved! Go to Solution.
Hello, gonna close this thread now since I found a case similar to mine:
I applied the solution and it worked. Thanks everyone!
Hello, gonna close this thread now since I found a case similar to mine:
I applied the solution and it worked. Thanks everyone!
@crln-blue
Can ou try this measure:
MonthPastYear =
CALCULATE(
SUM('Table'[Current Total]),
FILTER( ALL('Table'),
'Table'[Month]=MAX('Table'[Month]) &&
'Table'[Year] = MAX('Table'[Year]) - 1 &&
'Table'[TYPE] = MAX('Table'[TYPE])
)
)
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Fowmy , thanks for the reply. I tried your suggestion but the data generated isn't right. It gives off only one measure across all rows, maybe because of the MAX function.
Can you share some sample data to check ?
you paste your data here
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@crln-blue You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Also, since you're a New Member, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
HI @Greg_Deckler , thanks for the links. I checked them all and my case seems to be matched with getting data using the SAMEPERIODLASTYEAR. I tried using it the way the docs did but unsuccessful. I also checked the counterpart in your link which is TO **bleep** WITH DATEADD. However, I find it a bit confusing (sorry, I always have a hard time without examples) and I don't know how to use it in my formula since I only have months and years.
Your links are helpful and gonna use it on the future.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |