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

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.

Reply

total trasaction in each age group

I have age in X table and i have amount column in Y table, i have created the age bin in X table.

now i want to calculate total amount in each age bin which function i should use

please do the needful

1 ACCEPTED SOLUTION

hi @vijaykumargade 

you would need to

1) add a column with this:

AgeGroup =
SWITCH(
    TRUE(),
    [Age]<=15, "5-15",
    [Age]<=30, "16-30",
    [Age]<=55, "30-55",
    [Age]<=65, "56-65",
    "65&Above"
)
 
2) then plot Amount and AgeGroup columns in a table visual. 
 
I tried and it worked like this:
FreemanZ_0-1671323001446.png

 

for the 2) step, you may also choose to create a calculated table like this:

FreemanZ_1-1671323202000.png
SumTable =
ADDCOLUMNS(
    VALUES('Table'[AgeGroup]),
    "Amt",
    CALCULATE(SUM('Table'[Amt]))
)

View solution in original post

7 REPLIES 7

How can i create shape map with data labels on it like tableau

 

please refer below screen shot

vijaykumargade_0-1671373956813.png

 

this is power bi shape map

 

vijaykumargade_1-1671374009885.png

 

Age                  amount

 05                   20000

16                    60000

31                   700000

56                   400000

66                   1000000

30                   1200000  

26                   4500000

20                   60000000   

17                   9000000

 

 

i have created age bucket

05-15              20000

16-30              

31-55

56-65

66 & Above

 

now i want to calculate what is the total amount in each age group

 

 

 

hi @vijaykumargade 

you would need to

1) add a column with this:

AgeGroup =
SWITCH(
    TRUE(),
    [Age]<=15, "5-15",
    [Age]<=30, "16-30",
    [Age]<=55, "30-55",
    [Age]<=65, "56-65",
    "65&Above"
)
 
2) then plot Amount and AgeGroup columns in a table visual. 
 
I tried and it worked like this:
FreemanZ_0-1671323001446.png

 

for the 2) step, you may also choose to create a calculated table like this:

FreemanZ_1-1671323202000.png
SumTable =
ADDCOLUMNS(
    VALUES('Table'[AgeGroup]),
    "Amt",
    CALCULATE(SUM('Table'[Amt]))
)

I have one query

there is visual with personal information with filter, how can i create the same

please see the below screen shot

 

vijaykumargade_0-1671372871466.png

 

also how can i create shape map with labels on it like in  tableau

below is the screen shots for power bi and tableau maps

 

tableau map

vijaykumargade_3-1671374166221.png

 

power bi shape map

vijaykumargade_2-1671374120735.png

 

 

 

Greg_Deckler
Super User
Super User

@vijaykumargade SUM or SUMX?

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors