Forum Discussion
Daily Variance - 2 datasets / worksheets
- 8 years ago
Hi Newbie_77,
Based on my test, you can refer to below steps:
1.Create a new table to union your [DESCROPTION] in Table ‘Day1’ and Table ‘Day2’>. Create three measures to count the [DESCRIPTION] in Table’Day1’ and the Table’Day2’ and the difference.
Table = DISTINCT(UNION(VALUES(Day1[DESCRIPTION]),VALUES(Day2[DESCRIPTION])))
Day1 = IF(ISBLANK(COUNTROWS(FILTER(Day1,HASONEVALUE(Day1[DESCRIPTION])))),0,COUNTROWS(FILTER(Day1,HASONEVALUE(Day1[DESCRIPTION]))))
Day2 = IF(ISBLANK(COUNTROWS(FILTER(Day2,HASONEVALUE(Day2[DESCRIPTION])))),0,COUNTROWS(FILTER(Day2,HASONEVALUE(Day2[DESCRIPTION]))))
Difference = [Day1]-[Day2]
2.
2.Create two relationships to link the three tables.
3.Create a Table visual and add the ‘Table1’[DESCRIPTION], ‘Day1’[Day1], ‘Day2’[Day2] and [Difference] fields. And now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Hi Newbie_77,
Based on my test, you can refer to below steps:
1.Create a new table to union your [DESCROPTION] in Table ‘Day1’ and Table ‘Day2’>. Create three measures to count the [DESCRIPTION] in Table’Day1’ and the Table’Day2’ and the difference.
Table = DISTINCT(UNION(VALUES(Day1[DESCRIPTION]),VALUES(Day2[DESCRIPTION])))
Day1 = IF(ISBLANK(COUNTROWS(FILTER(Day1,HASONEVALUE(Day1[DESCRIPTION])))),0,COUNTROWS(FILTER(Day1,HASONEVALUE(Day1[DESCRIPTION]))))
Day2 = IF(ISBLANK(COUNTROWS(FILTER(Day2,HASONEVALUE(Day2[DESCRIPTION])))),0,COUNTROWS(FILTER(Day2,HASONEVALUE(Day2[DESCRIPTION]))))
Difference = [Day1]-[Day2]
2.
2.Create two relationships to link the three tables.
3.Create a Table visual and add the ‘Table1’[DESCRIPTION], ‘Day1’[Day1], ‘Day2’[Day2] and [Difference] fields. And now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Hi Daniel,
Many many thanks, exactly what i needed.
I love this community, extremely helpful.
Regards,
Phil.
- v-danhe-msft8 years agoMicrosoft Employee
Hi Newbie_77,
It's pleasant that your problem has been solved, could you please mark my reply as Answered?
Regards,
Daniel He