Forum Discussion
ACR Report Compare Snap Shots
- Anonymous1 year ago
Hi, martipe1
Thank you for your response.1.Firstly, the reason for creating a new table as a slicer is that if you use the current table directly as a slicer, it will restrict the data displayed to only those selected by the slicer. This approach does not allow for the requirement of selecting a date while displaying both the current date and the selected date.
2.Secondly, based on your updated data structure, you might consider replacing the use of visual calculations with the following measures:
Variance1 = FORMAT ( DIVIDE ( SUM ( 'Table'[0-30] ), CALCULATE ( SUM ( 'Table'[0-30] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[SnapShot/Days Past Due] = MAX ( 'Table'[SnapShot/Days Past Due] ) - 1 ) ) ), "0.00%" )Variance2 = FORMAT ( DIVIDE ( SUM ( 'Table'[31-60] ), CALCULATE ( SUM ( 'Table'[31-60] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[SnapShot/Days Past Due] = MAX ( 'Table'[SnapShot/Days Past Due] ) - 1 ) ) ), "0.00%" )Variance3 = FORMAT ( DIVIDE ( SUM ( 'Table'[61-90] ), CALCULATE ( SUM ( 'Table'[61-90] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[SnapShot/Days Past Due] = MAX ( 'Table'[SnapShot/Days Past Due] ) - 1 ) ) ), "0.00%" )Please note that you will need to create a measure for each column due to the visible limitations.
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much for your answer.
First a question. Why do I need a calculated table to use it as a slicer rather than just taking of the columns of my table and use it as as slicer?
In your example you show just one column for your age buckets, but in my case I have a calculated column for each age bucket and I can't get the previous date row in the matrix. What should I do?
Once again, thank you!
Hi, martipe1
Thank you for your response.
1.Firstly, the reason for creating a new table as a slicer is that if you use the current table directly as a slicer, it will restrict the data displayed to only those selected by the slicer. This approach does not allow for the requirement of selecting a date while displaying both the current date and the selected date.
2.Secondly, based on your updated data structure, you might consider replacing the use of visual calculations with the following measures:
Variance1 =
FORMAT (
DIVIDE (
SUM ( 'Table'[0-30] ),
CALCULATE (
SUM ( 'Table'[0-30] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[SnapShot/Days Past Due]
= MAX ( 'Table'[SnapShot/Days Past Due] ) - 1
)
)
),
"0.00%"
)Variance2 =
FORMAT (
DIVIDE (
SUM ( 'Table'[31-60] ),
CALCULATE (
SUM ( 'Table'[31-60] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[SnapShot/Days Past Due]
= MAX ( 'Table'[SnapShot/Days Past Due] ) - 1
)
)
),
"0.00%"
)
Variance3 =
FORMAT (
DIVIDE (
SUM ( 'Table'[61-90] ),
CALCULATE (
SUM ( 'Table'[61-90] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[SnapShot/Days Past Due]
= MAX ( 'Table'[SnapShot/Days Past Due] ) - 1
)
)
),
"0.00%"
)
Please note that you will need to create a measure for each column due to the visible limitations.
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- martipe11 year agoHelper II
Thank you for your answer and sorry for my late response.
I don't know what I'm doing wrong
When I try to create the Variance visual calculation that applies to the matrix, I copy and paste the one you kindly shared with me:Obviously I need to change it according to my data, but I don't understand why it doesn't show the option to select the table, just the columns that are included in the matrix:
That's a problem for the last part of the measure because I need to select the table
FILTER (ALLSELECTED ( 'Table' ),I created the time table as per your suggestion and cretaed the relationship with my data table
Once again, sorry for taking so long to respond and thanyou for your help!!- Anonymous1 year agoNot applicable
Hi, martipe1
Thank you for your response and for promptly providing feedback on the issue you encountered.
I may not have explained clearly that my second reply uses measures:
Not visual calculations:
For further details, please refer to:
Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
Measures in Power BI Desktop - Power BI | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- martipe11 year agoHelper II
Thank you very much for your answer.
I'm unable to look at previous date.
My slicer is pointing to the new tableI just adjusted the measure for my table names
MEASURE =VAR select1 =MAX ( 'time'[Snap Shot Date] )RETURNIF (ISFILTERED ( 'time'[Snap Shot Date] ),IF (MAX ( 'Accounts_Receivable_SnapShot'[Snap Shot Date] ) = select1|| MAX ( 'Accounts_Receivable_SnapShot'[Snap Shot Date] ) = select1 - 1,1,0),BLANK ())
I included the measure in the filters for the Matrix visualAnd yet no previous date
What am I missing?
Thank you in advance for your comments.