Forum Discussion
Embedded Measure is not giving me the correct value
I have a report that pulls monthly transactions. The transactions are listed by date, office number and amount into a table labeled "Actuals". The Actual table has a one to many relationship with a date table and I use this date table to present the information by weekly average.
My report shows the average weekly totals for the last 3 month.
I currently have this measure that I manually update every month to assigned the latest month :
1.0-Current Month = "Sep-24"
The above measure is embedded in this measure to get total month amounts based off the Date Table Fiscal Year Month column:
Current Period =
CALCULATE(
[Amount],
FILTER(
ALL('Date Table'),
'Date Table'[Fiscal Year Month] = [1.0-Current Month])
)I'm trying to streamline the process of having to manually update 1.0-Current Month measure every month by creating a measure give me the current month value based off the monthly transactions date column.
I created the following measure to pull the latest date in the transactions and then to look up that latest date against the Date Table which then provides me with the Date Table Fiscal Year Month value by creating the following measure and embedding it to "Current Period" measure.
Latest Date =
LASTDATE(Actuals[FISCAL DATE]
)
Latest Month =
LOOKUPVALUE('Date Table'[Fiscal Year Month],
'Date Table'[Date],
[Latest Date])
Current Period(with Latest Month Measure) =
CALCULATE(
[Temp Actuals],
FILTER(
ALL('Date Table'),
'Date Table'[Fiscal Year Month] = [Latest Month])
)Here are my results and as you can see measure "Current Period(with Latest Month Measure)" does not match the original "Current Period" measure.
I created "Measure Test" to see if "1.0-Current Month" value equals "Latest Month" value which are embedded in the Current Period measures and it shows that the values are the same.
Measure Test = [1.0-Current Month] = [Latest Month]
I've googled this issue and have not found anything. I've tried changing the format of the value, trim the value and still it did not work.
Has anyone have run into this issue or can provide some help? I would highly highly appreciate it.
- Anonymous1 year ago
Hi, Dbar84
It looks like you have found a solution. Could you please mark this helpful post as “Answered”?
This will help others in the community to easily find a solution if they are experiencing the same problem as you.
Thank you for your cooperation!I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- AnonymousNot applicable
Hi, Dbar84
As wini_R said, the computational logic of Current Period and Current Period(with Latest Month Measure) may seem similar, but they use different Measures for their computations.
In your screenshot, the value of Current Period(with Latest Month Measure) is larger than the value of Current Period. May I ask what is the logic of their calculation for Amount and Temp Acturals? What is the difference between these two Measure?
Could you please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file?
This will help us to solve your problem faster!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - Dbar84Frequent Visitor
Thank you all. I was able to find the solution which was to change ALL to ALLSELECTED as the page had filters.
Current Period(with Latest Month Measure) = CALCULATE( [Temp Actuals], FILTER( ALLSELECTED('Date Table'), 'Date Table'[Fiscal Year Month] = [Latest Month]) )- AnonymousNot applicable
Hi, Dbar84
It looks like you have found a solution. Could you please mark this helpful post as “Answered”?
This will help others in the community to easily find a solution if they are experiencing the same problem as you.
Thank you for your cooperation!I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.