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
David-CF
Regular Visitor

Newbi needs help with simple bar graph

Hi All

Apologies if this is a double up - I tried to post it 3 times now before but it keeps crashing.

I have a data set like this:

NameTotal DueDecNovOctPre-Oct
Customer 1$1,019.68$0.00$1,019.68$0.00$0.00
Customer 2$667.00$0.00$0.00$166.75$500.25
Customer 3$1,347.02$17.02$17.02$0.00$1,312.98
Customer 4$0.01$0.00$0.00$0.00$0.01
Customer 5$1,079.02$752.11$0.00$156.70$170.21
Customer 6$207.00$207.00$0.00$0.00$0.00
Customer 7$188.03$188.03$0.00$0.00$0.00
Customer 8$186.30$93.15$93.15$0.00$0.00
Customer 9$125.35$0.00$0.00$0.00

$125.35

 

I want to create a bar graph that shows the total value for each column and then have the tool tip display the top N customers in each time period (pre-oct, oct, etc).

 

I'm brand new to all this so any help appreciated.

 

Happy New Year

David

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @David-CF 

As tested, i can get this result finally, please download my pbix for more details.

1.create what-if parameter

2.Create measures

Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[year] = MAX ( 'Table'[year] )
            && 'Table'[month] = MAX ( 'Table'[month] )
            && 'Table'[Name] = MAX ( 'Table'[Name] )
    )
)

Measure 2 = RANKX(ALLSELECTED('Table'),[Measure],,DESC,Dense)

Measure 3 = IF([Measure 2]<=[top n Parameter Value],[Measure])

 

3. Create a tooltip page

4. Create tooltips based on report pages in Power BI Desktop

 

Capture3.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your help - I'll give it a try.

Washivale
Resolver V
Resolver V

Hi @David-CF 

 

Per your screenshot, if this is your raw data, do following transformation and create a bar graph.

 

1.  go to Edit Query - Select Customer Name Column - Use Unpivot other columns from Transform tab - Unpivot Columns

    

 

2. use Rename Attribute column if you want to

3. Close and Apply the power Query window

4. Add Bar graph visual on your report page. - attribute/renamed col in axis value column in values

5. create a tooltip page as instructed on below link.

https://docs.microsoft.com/en-us/power-bi/desktop-tooltips

 

this should get you what you trying to achieve, let me know in case of any questions.

 

Thank You,

Washivale

Thank you for your help - I'll give it a try.

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.