Forum Discussion
Help using matrix
- 7 years ago
Hi andfx,
You need to have a 1 to Many relationship wiht a single cross filter direction, then add the following measure to your data:
Predict/history = SWITCH ( TRUE (); SUM ( History[value] ) <> 0; SUM ( History[value] ); SUM ( Predict1[value] ) <> 0; SUM ( Predict1[value] ); SUM ( Predict2[value] ) <> 0; SUM ( Predict2[value] ); BLANK () )Be aware that this formula is assuming that predit 1 and predict 2 includes diferrente dates and they are also not on the history table.
Result is below and attached PBIX file.
Regards,
MFelix
I tried it.. Not worked.
I made calendar
Calendar = CALENDAR ( MIN ( history[date] ); MAX ( predict_one[date] ) )
Did the relationships
The result:
Thank you.
Hi andfx,
You need to have a 1 to Many relationship wiht a single cross filter direction, then add the following measure to your data:
Predict/history =
SWITCH (
TRUE ();
SUM ( History[value] ) <> 0; SUM ( History[value] );
SUM ( Predict1[value] ) <> 0; SUM ( Predict1[value] );
SUM ( Predict2[value] ) <> 0; SUM ( Predict2[value] );
BLANK ()
)
Be aware that this formula is assuming that predit 1 and predict 2 includes diferrente dates and they are also not on the history table.
Result is below and attached PBIX file.
Regards,
MFelix
- andfx7 years agoFrequent Visitor
Thanks a lot, you're the best!
Be aware that this formula is assuming that predit 1 and predict 2 includes diferrente dates and they are also not on the history table.
Do you think it's possible to adapt that formula if dates on predit 1 and 2 they are on the history table too ?
Thank yo :))