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.
Hello,
i have one scenario where "Info Table" have value for Jan, Feb, March, but we currently are in Oct.
How can i show a separate column for diff of March and Feb?
and automatically if i get data for April, it will update to be the diff of April - March?
i have a "calendar table" connecet with this " Info Table" by dates.
Please let me know if you want me to clarify more. thanks in advance!
Br,
RW
Solved! Go to Solution.
Hi @Anonymous ,
Please create three new columns:
Jan = IF('Fact Table'[Month] = 1, 'Fact Table'[Value])
Feb = IF('Fact Table'[Month] = 2, 'Fact Table'[Value])
Mar = IF('Fact Table'[Month] = 3, 'Fact Table'[Value])
Create a table visual:
You can rename field for table visual like below:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share the download link of the PBI file.
Hello Yadong Fang!
Thanks for your exmaple, my final goal is to show the diff of latest month in visualization report , like what i present in excel.
Do you know how to create a separate value for "Diff", regardless the column filter (in this case, "Month") ? Thanks again!
Hi @Anonymous ,
Please create three new columns:
Jan = IF('Fact Table'[Month] = 1, 'Fact Table'[Value])
Feb = IF('Fact Table'[Month] = 2, 'Fact Table'[Value])
Mar = IF('Fact Table'[Month] = 3, 'Fact Table'[Value])
Create a table visual:
You can rename field for table visual like below:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You'd better transform data like below in Power Query firstly:
You will get a table like this:
Relationship between Calendar table and Fact table:
Try following DAX to create two columns:
Previous Month = IF('Fact Table'[Month] = MAX('Calendar Table'[Month]),CALCULATE(MAX('Fact Table'[Value]),FILTER('Fact Table','Fact Table'[Month] = MAX('Calendar Table'[Month])-1 && 'Fact Table'[ID] = EARLIER('Fact Table'[ID]))))
Diff = IF('Fact Table'[Month] = MAX('Calendar Table'[Month]), 'Fact Table'[Previous Month] - 'Fact Table'[Value])
You will get the result you wnat:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
107 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
143 | |
104 | |
104 | |
80 | |
66 |