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.
Hello All,
We have Dataset like below
ID Name Age
--- ---- ----
10 AAA 40
20 BBB 34
30 CCC 68
40 DDD 58
50 EEE 79
60 FFF 39
70 GGG 28
I want to create slicer visaul with age column like below
Age_Calc
-----
10
20
30
40
50
60
70
80
90
100
I tried to create caluculted column : if(Table1(Age)>10,10,if(Table1(Age)>20,20,.....,If(Table1(Age)>100,100)))..But does not give correct result.
It reruns only
10,100 only instead of 10,20,30..100.
Thanks
Narasimha Reddy
Solved! Go to Solution.
Hi @Anonymous,
Based on my test, you could refer to below formula:
Column = IF ( [Age] < 20, 10, IF ( 'Table1'[Age] < 30, 20, IF ( [Age] < 40, 30, IF ( [Age] < 50, 40, IF ( [Age] < 60, 50, IF ( [Age] < 70, 60, IF ( [Age] < 80, 70 ) ) ) ) ) ) )
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi,
You may download my solution PBI file from here.
Hope this helps.
Hi @Anonymous,
Based on my test, you could refer to below formula:
Column = IF ( [Age] < 20, 10, IF ( 'Table1'[Age] < 30, 20, IF ( [Age] < 40, 30, IF ( [Age] < 50, 40, IF ( [Age] < 60, 50, IF ( [Age] < 70, 60, IF ( [Age] < 80, 70 ) ) ) ) ) ) )
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Can you try changing the formula and add the AND statement to specify the ranges?
E.g.
IF( AND(Table1(Age)>=0, Table1(Age)<=10) , 10 ,
IF( AND(Table1(Age)>10, Table1(Age)<=20) , 20 ,
IF( AND(Table1(Age)>20, Table1(Age)<=30) , 30 ,
etc
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 |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |