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 a line graph which contains actuals up to current month, and would like to extend this line with forecast values that I have.
I have measures setup as follows to do a cumulative sums, this is one for fees rendered:
Solved! Go to Solution.
Hi @jamaza ,
We can create a measure to meet your requirement.
1. At first, we need to create a relationship between two tables.
2. Then we can create a measure like this,
Measure =
VAR max_period =
MAXX ( ALLSELECTED ( Job ), Job[FinancialPeriod] )
VAR sum_ = [Fees Rendered] + [Fees Rendered 2]
VAR x =
CALCULATE (
[Fees Rendered],
FILTER ( ALLSELECTED ( Job ), Job[FinancialPeriod] <= max_period )
)
VAR y =
CALCULATE (
[Fees Rendered 2],
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[FinancialPeriod] <= max_period )
)
RETURN
IF ( ISBLANK ( [Fees Rendered] ), x + y + [Fees Rendered 2], sum_ )
3. At last we can create a line chart ( We need to use the longest FinancialPeriod for X axis ), the result like this,
If it doesn’t meet your requirement, could you please provide a mockup sample based on the table that we have shared or describe the fields of each tables and the relations between tables simply?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jamaza ,
We can create a measure to meet your requirement.
1. At first, we need to create a relationship between two tables.
2. Then we can create a measure like this,
Measure =
VAR max_period =
MAXX ( ALLSELECTED ( Job ), Job[FinancialPeriod] )
VAR sum_ = [Fees Rendered] + [Fees Rendered 2]
VAR x =
CALCULATE (
[Fees Rendered],
FILTER ( ALLSELECTED ( Job ), Job[FinancialPeriod] <= max_period )
)
VAR y =
CALCULATE (
[Fees Rendered 2],
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[FinancialPeriod] <= max_period )
)
RETURN
IF ( ISBLANK ( [Fees Rendered] ), x + y + [Fees Rendered 2], sum_ )
3. At last we can create a line chart ( We need to use the longest FinancialPeriod for X axis ), the result like this,
If it doesn’t meet your requirement, could you please provide a mockup sample based on the table that we have shared or describe the fields of each tables and the relations between tables simply?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-zhenbw-msft ,
Thank you so much for taking the time to assist me - the DAX you wrote worked perfectly in terms of joining the cumulative values of both tables. The only hickup i've encountered is that i am displayed with periods before and after the projects data
I have 1 table of all periods
"Actuals" table also contains periods up to current month
"Forecast" table contains periods from current month
Is it possible to tweak the DAX so that it provides periods from MIN Period of "Actuals" and MAX Period of "Forecast" ? this would cover the whole data range required to be displayed on the graph.
My current DAX is as follows:
Thanks again for your assistance!
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |