Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |