Forum Discussion
Use a variable in a measure as a filter within same measure
Hello, ChuckChuck
Sorry for my delay. Can you share your formula (based my formula) and screenshots for current and expected result?
Hi popov, I made some test data and applied the measure to it and then created some screen grabs. This is close to what I need, but it is picking up the values for dates I'm not interested in and it's not giving me a total, just blank.
- popov8 years ago
Resolver III
Hi, ChuckChuck
Try this formula
Total Month Expected vs Actual =
SUMX (
ADDCOLUMNS (
SUMMARIZE ( Sheet1, Sheet1[Customer Name], Sheet1[Expected Date] ),
"UnderPerforming", CALCULATE (
[Month Expected] - [Month Actuals],
FILTER ( Sheet1, [Frequency] = "Only Once" )
)
),
IF ( [UnderPerforming] > 0, [UnderPerforming] )
) - ChuckChuck8 years ago
Helper I
Hi popov, Unfortunately this version still isn't producing the desired results. In fact, when I add a table to just show the measure for each customer name the table is excluding records and the measure doesn't add up correctly. Here's a screenshot:
- popov8 years ago
Resolver III
Hello, can you share your pbix file to test? - ChuckChuck8 years ago
Helper I
Hi popov,
I don't see an option to attach a PBIX file. Were you able to get the formula to work on a similar set of data on your end? - popov8 years ago
Resolver III
Hello, ChuckChuck
You can upload it to OneDrive or Dropbox and post the link here.