Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need help to create a Line Graph with four different report (4 sheets). I have done a appended query so the 4 sheets are combined. However, each report have different date periods so the line graph will be inconsistent. How can I form the data so that the X-axis show only last 30 values or similar in order to make a comparable graph.
Please let me know if you need furhter information. Help very much appreciated.
Rgrds, Fred
Solved! Go to Solution.
there is multiples solutions
you could combine the 4 tables by this:
Modeling - New Table
Merged4Books = UNION
(
TOPN(30;Table1;Table1[Date];DESC);
TOPN(30;Table2;Table2[Date];DESC);
TOPN(30;Table3;Table3[Date];DESC);
TOPN(30;Table4;Table4[Date];DESC);
)
or alternatively you can add sorted index by date to the source and then join on that so the most current date is 1 the day before 2 and so on
theres other possibibilities but for that I would need to see the data
there is multiples solutions
you could combine the 4 tables by this:
Modeling - New Table
Merged4Books = UNION
(
TOPN(30;Table1;Table1[Date];DESC);
TOPN(30;Table2;Table2[Date];DESC);
TOPN(30;Table3;Table3[Date];DESC);
TOPN(30;Table4;Table4[Date];DESC);
)
or alternatively you can add sorted index by date to the source and then join on that so the most current date is 1 the day before 2 and so on
theres other possibibilities but for that I would need to see the data
Thank you. Brilliant, I appreciate it.
I used the first alternative.
So the next crux. I don't want it to ignore null values. What can I do about that?
Thanks,
Fred
Null values of what? Is date Null???
The merge should give you 30 rows per table does not matter if some field in rows is blank.
What is the problem? maybe give some screenshot of the Chart or Data???
I can give you a snap shot of the column that I am comparing in the graph.
However, I am comparing Fuel Consumption and for some dates, the values are 'n/a'. The graph is adding up the values instead of leaving it as zer value, see graph
still don't get it that graph is strange what do you want to have instead of zero
tell me what you want your result to be
you can use IF ISBLANK
Never mind. Got it to work.
Thanks for the help, I appreciate it.
Hi @Freddus,
Have you achieved the original requirement? If so, would you please kindly mark the corresponding reply as an answer or share your solution so that it can benefit more people?
Regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |