Forum Discussion
wllmc
7 years agoNew Member
Variables
Hi, I am looking for a way to add date as variables in the tables created. I have a few more other tables that are alike and want to avoid having to go into each table to update the dates. ABC_SU...
- 7 years ago
Try putting them into a measure then using the measure in the table creation maybe?
Start Date = DATE(2017,1,1)
End Date = DATE(2017,3,31)
ABC_SUMM_US_LY = CALCULATETABLE ( SUMMARIZECOLUMNS ( ABC_SUMM[SERV_NAME], "TTL CONT EX OH", SUM ( ABC_SUMM[TTL CONT EX OH] ), "TTL REV", SUM ( ABC_SUMM[TTL REV] ) ), ABC_SUMM[SERV_NAME] = "US", DATESBETWEEN ( ABC_SUMM[MONTHYEAR], [Start Date], [End Date] ) )ABC_SUMM_US_TY = CALCULATETABLE ( SUMMARIZECOLUMNS ( ABC_SUMM[SERV_NAME], "TTL CONT EX OH", SUM ( ABC_SUMM[TTL CONT EX OH] ), "TTL REV", SUM ( ABC_SUMM[TTL REV] ) ), ABC_SUMM[SERV_NAME] = "US", DATESBETWEEN ( ABC_SUMM[MONTHYEAR], [Start Date], [End Date] ) )
wllmc
7 years agoNew Member
I am trying to re-created a report that was produced in excel which involved several aggregated calculations that lead me to create multiple calculated tables. My end goal is to show the City, Total Revenue and YoY change on a table/matrix and chart hence the tables for "this year" and "last year". I probably don't think its the ideal but I am open for a better method.
jdbuchanan71
Super User
7 years agoHello wllmc
You need to start using the time intelligence functions in Power BI. Take a look at this video from the SQL BI team. https://www.sqlbi.com/tv/time-intelligence-in-microsoft-power-bi/