Forum Discussion
If condition using measure
Hi,
I have following available;
- A measure: Net Revenue = Sum(Revenue[Amount])
- A customer Table related to Sales (Cross filter direction - Both)
Required Visual(Matrix)
| Customer | Net Revenue | Status |
| C1 | 100 | Positive |
| C2 | 125 | Positive |
| C3 | 200 | Positive |
| C4 | -60 | Negative |
| C5 | 0 | Blank |
One way to have Status column is a new measure:
Status = If([Net Revenue]>0,"Positive",If([Net Revenue]<0,"Negative","Blank")))
However, It's exceed the limit of resource.
Is there any other way we can have the Status column?
Note - There will be more coulmns to be added to the matrix and we cannot do any changes to the data sets.
3 Replies
- v-lili6-msftCommunity Support
hi, Anonymous
I think the formula is the simplest.
and if you could use this formula:
Status 2 = SWITCH(TRUE(), [Net Revenue]>0,"Positive", [Net Revenue]<0,"Negative", "Blank")
and if you could use slicer to filter some data.
Best Regards,
Lin
- AnonymousNot applicable
Hi Lin,
I have already used the Switch. Not helpful.
"Resources Exceeded"
Thanks,
Raman
- v-lili6-msftCommunity Support
hi, Anonymous
the issue occurs when a visual has attempted to query too much data for the server to complete the result with the available resources.
As suggested in the error, you may need to try filtering the visual to reduce the amount of data in the result currently.
For building fast and reliable reports in Power BI. Please refer to “Power BI Performance Best Practices “
If possible, could you share the sample pbix file for us have a test.
Best Regards,
Lin