Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
All,
I need some help getting the total sum to show. when i'm using if statements.
Reference # | Data | Type |
x-1 | 1000 | Forecast |
x-2 | 2000 | Forecast |
x-4 | 5000 | Forecast |
x-1 | 1000 | Result |
x-2 | 2000 | Result |
x-3 | 3000 | Result |
This is sample data in the raw form. I used a series of mesures to turn the data into the following in a matrix visual in powerBI. everything on this visual with the exeption of the Reference # are measures.
Reference # | Forecast | Result | Forecast Status | Status | In forecast closed | not in forecast and closed | in forecast not closed |
x-1 | 1000 | 1000 | in forecast | closed | 1000 | 0 | 0 |
x-2 | 2000 | 2000 | in forecast | closed | 2000 | 0 | 0 |
x-3 | 3000 | not in forecast | closed | 0 | 3000 | 0 | |
x-4 | 5000 | in forecast | no closed | 0 | 0 | 5000 | |
Total | 8000 | 6000 | no total | no total | no total |
when i"m writing my measure for "In forecast closed" for example: I have the following code:
In forecast closed=if([Forecast Status]="in forecast",if([Status]="closed",[Result],0),if(HASONEVALUE(Data[Reference #]),0,"no total")
I wrote the word "no total" where I didn't know how to make it sum the entire column, much appriciated if anyone give me some idea how to sum this.
Solved! Go to Solution.
In forecast closed=SUMX(VALUES(Data[Reference #]),if([Forecast Status]="in forecast"&&[Status]="closed",[Result],0))
In forecast closed=SUMX(VALUES(Data[Reference #]),if([Forecast Status]="in forecast"&&[Status]="closed",[Result],0))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
27 | |
20 | |
15 | |
12 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |