Forum Discussion
Previous Year Dateadd Excluding Data
- Anonymous2 years ago
Hi mclawler ,
For your total and Auto outside the value is not correct, we can use the ISINSCOPE function, the total for a correct sum, Auto outside the value of some can not get, we can try to use a few more defined variables to get a valid result, I hope my solution is helpful to you!AmountBooked COUNT(Copy) = VAR AutoCount=CALCULATE( COUNT('AutoLoanMatrixDummy'[AmountAdvanced]),'LoanDataDummy'[Product (groups)]="Auto") VAR OtherCount=COALESCE( CALCULATE(COUNT(LoanDataDummy[Amount Booked]),ALLEXCEPT('LoanDataDummy','LoanDataDummy'[Product (groups)])),0) VAR C=CALCULATE(COUNT(LoanDataDummy[Amount Booked]),FILTER('LoanDataDummy','LoanDataDummy'[Product (groups)]="Auto")) RETURN IF( ISINSCOPE('LoanDataDummy'[Product (groups)]), SWITCH( TRUE(), MAX('LoanDataDummy'[Product (groups)])="Auto", AutoCount, OtherCount), AutoCount+OtherCount-C)I have updated your data to the results you need, if you have any other questions you can check the PBIX file I have uploaded, I would be grateful if my solution can help you solve your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom ShenIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi mclawler
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
- mclawler2 years ago
Helper III
How do I upload a pbix or dummy tables or where can I email them to?
- Anonymous2 years agoNot applicable
Hi mclawler ,
If you are unsure how to upload data please refer to
Hope it helps!
Best regards,
Community Support Team_ Tom Shen - mclawler2 years ago
Helper III
Hi Rita!!
ProductionTableDummy.pbix
Here is the dummy pbix that should align with the table below once accurate. I have noticed that if you highlight multiple months in the slicer then some of the RV loans appear, but you shouldn't have to do that based on the specific measure columns: