Forum Discussion
Variables table using CALCULATETABLE with condition
Hi Jaggana ,
To what I can see from the code you want to return true if Australia is on the values of the selected countries just simply use the values, there is no need to use the CALCULATETABLE since the values will return a single row or several rows depending on your filters
Selected country =
VAR Country =
VALUES(SalesTerritory[Country])
RETURN
SWITCH(TRUE(), "Australia" IN Country, TRUE(), BLANK())
If this is not the expected result please let me know what is the purpose of this calculation so I can let you know how to updated.
- Jaggana9 months agoAdvocate I
Thank your for your time, but as I wrote I drastically simplified the code, what I really need is to condition the value of the variable between 2 variable tables
- v-nmadadi-msft9 months agoCommunity Support
Hi Jaggana ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Thank you- Jaggana9 months agoAdvocate I
Hello v-nmadadi-msft,
As I can't upload a PBIX, CSV or TXT file, I've added the data in the initial post
- MFelix9 months agoSuper User
Hi Jaggana ,
If you don't provide a complete sample of your code it's difficult to pinpoint where you may need to change the formulas in order to get the correct value, depending on the context of the calculation a lot of changes may or not be needed.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.