Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Pandetbaby
Frequent Visitor

Using IF function - but still want to be able to sum results (as numeric) ...?

Hey!

I'm trying to update a rewards program at work where we want to be able to both see if (yes/no) a customer deserves a reward, but also group the level of reward each reacieve in form a points. 

 

I've managed to establish Yes/ No by using  = IF (Purchase >= 92 , "Yes", "No")

E.g. if Purchase is over 92 then Yes they should recieve an award, otherwise no

(92% represents the % the limit they need to hi)

 

I've similarly been able to use the If function to group the points = IF(Purchase = 92, "100",

IF(Purchase = 93, "200",
IF(Purchase = 94, "300", "0")))
This successfully groups the customers into groups based on the % they have hit (e.g. they show up in a table as 92% represents 100 , while 94% represents 300)
 
My problem is however that I cant sum up the to total amount of points collected. 
As I want to track the total per month - the IF formula does not seem to be beneficial.
 
I would very much appreciate it if someone could suggest another formula where I can still group the data but keep the results as numeric values that can be summarized in a table. 
 
Thank you!
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Pandetbaby  why don't you try 

points = IF(Purchase = 92, 100,

IF(Purchase = 93, 200,
IF(Purchase = 94, 300, 0)))

OR 
SWITCH(TRUE()
                    ,Purchase = 92,100
                    ,Purchase  = 93, 200
                    ,Purchase = 94, 300,0)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@Pandetbaby  why don't you try 

points = IF(Purchase = 92, 100,

IF(Purchase = 93, 200,
IF(Purchase = 94, 300, 0)))

OR 
SWITCH(TRUE()
                    ,Purchase = 92,100
                    ,Purchase  = 93, 200
                    ,Purchase = 94, 300,0)

Hey

@Anonymous 

 

Am I supposed to write out the IF formula first and then
OR
SWITCH( TRUE () etc ?

Anonymous
Not applicable

No ... just use this. Same thing can be done with switch in case you have multiple conditions

points = IF(Purchase = 92, 100,

IF(Purchase = 93, 200,
IF(Purchase = 94, 300, 0)))
 
 

Hey @Anonymous ,
I have successfuly done that, however my issue is that I cant add the points together using this formula it appears. 

 

I get 
Month 1 = 100

Month 2 = 300

Month 3 = 100 

 

But I can't make any of the visuals sum them up to column/row totals

Anonymous
Not applicable

Create a measure 
Measure = sum('table'[Points])
Or else share some sample data along with expected result

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.