Forum Discussion
pedroccamaraDBI
Post Partisan
4 years agoTREATAS with 2 conditions same table
Hello everyone, My budget measure with treatas is not working and i don't have enough knowledge to understand why. Besides your help, which is always amazing, could you explain me why? So, among o...
- 4 years ago
Hi,
The problem is in your time group columns. The values in the two tables don't match.
In Sales you have values:
Whereas in Budget you have:
So when treatas brings the filter over from Sales to budget nothing matches and you get a blank result.
littlemojopuppy
Community Champion
4 years agobcdobbs great minds think alike 😉
littlemojopuppy
Community Champion
4 years agopedroccamaraDBI if you look at the pic you posted in response to the article I offered, it's clear that Power BI can't determine the appropriate time period for budget. Try reworking your data model. You should have four tables:
- Date table (must include date and MM-YYYY for each record)
- Family dimension
- Sales. Create relationships between MM-YYYY and the date table AND Family and the Family dimension.
- Budget. Create relationships between date and the date table AND Family and the Family dimension.
From there should be really easy. Use the two measures provided earlier for Sales and Budget. Create your matrix using fields from the date table and Family dimension on the axes. And you should be golden!
Hope this helps!