Forum Discussion
SUMMARIZE function and SAMEPERIODLASTYEAR returning BLANK
- 6 years ago
HI, I see what you are trying to achieve. I would recommend to use addcolumns along with summarize, for additional columns, i.e., sales & previous year sales.
So the syntax should be Addcolumns ( Summarize ( Sales , Sales [Item] ), "Current Year Sales" , [Current Year Sales Measure] , "Prev Year Sales" , [Prev Year Sales Measure] )
akhoury - I haven't really see time "intelligence" functions work well inside something like SUMMARIZE. You might try using GROUPBY instead of SUMMARIZE if you can but probably won't work there either.
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-TITHW/m-p/434008
If you can post sample data and expected output, can work to see if there is a solution.
Not really enough information to go on, 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.
Greg_Deckler Spot on regarding time intelligence. Your links highlighted important aspects about it I did not know.
Thanks for sharing and your comments on how to present our issue.
Aminek