Forum Discussion
PZU_DGW
5 years agoRegular Visitor
Filtering table
As a beginner in DAX I have this report that can be filtered on a specific year and some other filters. But I want to calculate a measure that is a snapshot, not depending on a specific year or other...
- 5 years ago
Thanks Jos!
That's the solution I was looking for! I forgot to add the '
ALL(PAYMSCHEMETABLE),'. It did the trick.Greetings PZU
Anonymous
5 years agoNot applicable
// First of all, please don't torture
// the end user with names of tables
// written the way they are. Make them
// pleasant to the eye. Respect your
// users and future developers.
// Second, you should never slice and
// dice in the UI by columns in a fact
// table. It's dangerous and you're risking
// that your measures will one day stop
// working correctly, of which you will not
// even be aware of.
[Measure] =
CALCULATE(
COUNTROWS( PaymentScheme ),
// You can remove KEEPFILTERS if the column
// it wraps will not be used in the UI to
// slice and dice by.
KEEPFILTERS(
PaymentScheme[SchemeStatus] = 0
),
// Same remark applies to this one. If
// you have a field that you're planning
// on using in the UI, please make sure
// it's written decently, with spaces between
// the constituent words. Respect your
// audience.
KEEPFILTERS(
CONTRACTS[ContractStatus] <> "Ended"
)
)
// Please learn about KEEPFILTERS to know when
// to use it. You might need to remove this
// modifier here to obtain what you want. I can't
// from your description know whether or not
// it's required. It's your task to figure this
// one out.