Forum Discussion
Duplicate a line
Hello guys,
I would like to get some help with the report I built.
I have built Dax measure on Potential ID to calculate a sum based on the year. Unfornately some Potential ID have both amounts calculated on "this year" and "next year".
It is why I'am looking how I can duplicate some lines based on Potential ID.
I would like for example to duplicate "zcrm_1803507000001707007" in two lines.
Do you know how to do it ?
2 Replies
- amitchandakSuper User
Anonymous , You can use time intelligence with date table .
example
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
P - v-luwang-msftCommunity Support
Hi Anonymous ,
Based on the information you provided, you did not provide specifics on how to determine which data is to be duplicated. You can create a table with the data that needs to be added using calculatetable and the filter criteria, and then use Union to merge the original table with the new table.
Did I answer your question? Mark my post as a solution!
Best RegardsLucien