DAX Assistance - (VAR + IF Statement)

Good day All, hope all is well.

I need some guidance on a dax i would like to create, Its based on a tiering . Example listed below
image

Could i use the VAR with IF statement for this example to combine into a single Dax Statement?

I started with below but im not sure how to bring the sales component in, can you help?

CA Distributor Growth Target =
VAR Silver= FILTER(‘CustomerBuyer’,CustomerBuyer[Customer Buyer Code] = “1000065531”|| CustomerBuyer[Customer Buyer Code] = “1000065478”|| CustomerBuyer[Customer Buyer Code] = “1000064993”)
VAR Gold= FILTER(‘CustomerBuyer’,CustomerBuyer[Customer Buyer Code] = “1000064774”|| CustomerBuyer[Customer Buyer Code] = “1000065090”|| CustomerBuyer[Customer Buyer Code] = “1000141700”|| CustomerBuyer[Customer Buyer Code] = “1000144987”|| CustomerBuyer[Customer Buyer Code] = “1000065320”)

RETURN
if([Sales Amount], Silver
If
Regards
Neilon

Hi @neilonbooysen.

To help us further analyze your current state and visualize your issue, could you please provide as many as you can of:

  • Your work-in-progress PBIX file, using sanitized data if necessary
  • Your dataset as an Excel file (again, sanitized if necessary)
  • A detailed mock-up (marked-up screenshot or Excel file) of your desired outcome.

Also, if you provide DAX in your post, please format it using the built-in formatter.

Greg
_eDNA Forum - Format DAX

@neilonbooysen Please try this measure:

CA Distributor Growth Target =
VAR Silver = { 1000065531, 1000065478, 1000064993 }
VAR Gold = { 1000064774, 1000065090, 1000141700, 1000144987, 1000065320 }
VAR Customer =
SELECTEDVALUE ( CustomerBuyer[Customer Buyer Code] )
RETURN
IF (
Customer
IN Silver
&& [Sales Amount] > 5000000,
0.02,
IF ( Customer IN Gold && [Sales Amount] > 10000000, 0.03, 0 )
)

If the Customer Buyer Codes are actually text, then you may need to put them in double quotes.

Let me know!

Respectfully,
DataZoe

Hi Zoe

Thanks for this guidance, it worked.

Regards
Neilon