Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi ! I want to count or summarize the alphabets created from the if statement by a measure !
My Data:-
My measure of the if statement:-
Country | Category | LCE | Volume | Value |
Country 1 | Category 1 | C | 0 | 3 |
Country 2 | Category 1 | L | 0 | 4 |
Country 3 | Category 1 | C | 0 | 6 |
Country 4 | Category 1 | C | 1 | 15 |
Country 5 | Category 1 | C | 1 | 15 |
Country 6 | Category 1 | C | 0 | 0 |
Country 7 | Category 1 | L | 0 | 2 |
Country 8 | Category 1 | L | 0 | 4 |
Country 9 | Category 1 | C | 0 | 0 |
Country 10 | Category 1 | E | 0 | 2 |
Country 11 | Category 1 | C | 0 | 3 |
Country 12 | Category 1 | C | 0 | 1 |
Country 13 | Category 1 | C | 1 | 14 |
Country 14 | Category 1 | L | 0 | 4 |
Country 15 | Category 1 | L | 0 | 6 |
Country 16 | Category 1 | C | 0 | 1 |
Country 17 | Category 1 | L | 7 | 143 |
Country 18 | Category 1 | E | 0 | 0 |
The LCE column is a measure created with IF statement:-
I want to count or summarize , that number of countries coming under L, C, E and also the summation of Volume and Value under L,C,E.
My desired answer and structure:-
L | C | E | |
Country Combinations | 6 | 10 | 2 |
Volume | 7.8 | 3.6 | 0.1 |
Value | 164 | 57 | 1.7 |
I used this measue but it is giving the total count of LCE:-
Thanks in advance !
Hi !
My LCE column that you see is based out of a LOGICAL IF Measure with certain condition.Then how can I use count?
Hello @souvik900766
You can create a calculated table by using the below calculation.
CountAlphabet =
UNION (
SUMMARIZE (
'Count Alphabet',
"Values", "Country Combinations",
"L", CALCULATE ( COUNT ( 'Count Alphabet'[LCE] ), 'Count Alphabet'[LCE] = "L" ),
"C", CALCULATE ( COUNT ( 'Count Alphabet'[LCE] ), 'Count Alphabet'[LCE] = "C" ),
"E", CALCULATE ( COUNT ( 'Count Alphabet'[LCE] ), 'Count Alphabet'[LCE] = "E" )
),
SUMMARIZE (
'Count Alphabet',
"Values", "Volume",
"L", CALCULATE ( SUM ( 'Count Alphabet'[Volume] ), 'Count Alphabet'[LCE] = "L" ),
"C", CALCULATE ( SUM ( 'Count Alphabet'[Volume] ), 'Count Alphabet'[LCE] = "C" ),
"E", CALCULATE ( SUM ( 'Count Alphabet'[Volume] ), 'Count Alphabet'[LCE] = "E" )
),
SUMMARIZE (
'Count Alphabet',
"Values", "Value",
"L", CALCULATE ( SUM ( 'Count Alphabet'[Value] ), 'Count Alphabet'[LCE] = "L" ),
"C", CALCULATE ( SUM ( 'Count Alphabet'[Value] ), 'Count Alphabet'[LCE] = "C" ),
"E", CALCULATE ( SUM ( 'Count Alphabet'[Value] ), 'Count Alphabet'[LCE] = "E" )
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |