Forum Discussion
Measure for "Earned" returns wrong value
Hi,
I am new to Power BI, so apologies if I am doing something completely wrong.
I have a table in which each row is a project.
Each project has a column called "Phase" which has the following stages: "1. Lead","2. Opportunity", 3. Proposal Dev", 4. "Proposal Sent",..."7. Sold", "8. Cash Collected".
Each project also has "Client Budget".
I have made a simple measure called "Total Nominal Budget":
Total Nominal Budget = SUM('Unique Project Table'[Current Client Budget])
Now, I want to create a measure in which I can calculate the total "Earned", which is the "Client Budget" in which the "Phase" column has either "7. Sold" or "8. Cash Collected". I tried with the below measure, but it returns a wrong value:
Earned = CALCULATE('Unique Projects Data Model'[Total Nominal Budget],FILTER('Unique Projects Data Model', 'Unique Projects Data Model'[Phase] = "7. Sold" || "8. Cash Collected"))
What am I doing wrong here? I guess this should be quite straightforward..
My first guess to the issue would be that you're using a hidden table with no relation between the other tables.
Using Unique Projects Data Model instead gives me the result you mentioned
Total Nominal Budget = SUM('Unique Projects Data Model'[Current Client Budget])
9 Replies
- Gordonlilj
Solution Sage
Hi,
Try adding 'Unique Projects Data Model'[Phase] = "8. Cash Collected" instead of "8. Cash Collected"
Earned = CALCULATE('Unique Projects Data Model'[Total Nominal Budget],FILTER('Unique Projects Data Model', 'Unique Projects Data Model'[Phase] = "7. Sold" || 'Unique Projects Data Model'[Phase] = "8. Cash Collected"))- AnonymousNot applicable
Gordonliljit still returns a wrong value.
It seems that it simply returns the [Total Nominal Budget] although I am trying to filter by the specific "Phase".
- Gordonlilj
Solution Sage
Is it possible for you to share some sample data?