Forum Discussion
ytd
Hello,
In power BI desktop my problems is that I need to combine 2 different YTD measures (calculated on 2 tables, thus 2 different date tables used too).
The program does not allow me to include 2 YTD in one report – it shows either one or another, but not both at the same time.
Basically I need to show in one table per client, both: YTD of sales figures and YTD of time spent figures, where "sales figures" come from SALES table and "time spent figures" come from TIME_SPENT table.
Also I need to calculate the ratio YTD_sales/YTD_time_spent.
To determin the time frame I use YEAR and MONTH slicers.
Table eaxmple:
Client YTD_sales YTD_time_spent YTD_sales/YTD_time_spent
Client1 1000 50 20
Client2 200 20 10
etc.
Thank you in advance.
Katerina
Hi Katerina_Bis,
When you added measures *YTD_turnover amd *YTD_timelog to a table visual, which error threw out? Please try to set the cross filtering direction to Both for each relationship among those tables. For more information, see: Create and manage relationships in Power BI Desktop.
Best Regards,
QiuyunYu
8 Replies
- tringuyenminh92Memorable Member
Hi Katerina_Bis,
I got your point but could you please share your sample data or data structure? so i could quickly figure out solution.
- Katerina_BisFrequent Visitor
Hello,
I cannot share the data sample. But I have drafted the data structure and the desirable result.
Hope it helps.
data_structure
- tringuyenminh92Memorable Member
Hi Katerina_Bis,
I think you should have one more Dates table for both of Finance_data and JIRA_Data as side-by-side topic and you could use date column of that Dates table for slicer.(Finance and JIRA will refer date column of new DATES table)
One more concern that *YTD_turnover and *YTD_timelog are default columns from sources or calculated measures? if they are calculated measure that computed by DATE_FIN and DATE_LOG, you need to adjust formula to compute by new Dates table.