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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jeffw14
Helper I
Helper I

How to create a visual based on a summary of measure results

I have a table that uses a date slicer and contains Customer Name with their Current year revenue using a SUM function, the Prior Year Revenue using a Measure, the Year over Year Revenue Variance as a measure, and a third measure determining the customer status as DECLINER, GAINER, NEW BUSINESS, LOST BUSINESS, or FLAT based on the YOY variance and the revenue fields. It looks as follows:

 

Customer NameRevenue Prior YearRevenue CurrentYOY Revenue VarianceCustomerStatus
CUSTOMER 1$1,285,140$1,239,289($45,851)DECLINER
CUSTOMER 2$250,856$537,744$286,889GAINER
CUSTOMER 3$0$188,536$188,536NEW BUSINESS
CUSTOMER 4$1,825$0($1,825)LOST BUSINESS
CUSTOMER 5$1,000$1,000$0FLAT
CUSTOMER 6$650,000$700,000$50,000GAINER
CUSTOMER 7$300,000$310,000$10,000GAINER
CUSTOMER 8$100,000$50,000($50,000)DECLINER
CUSTOMER 9$0$100,000$100,000NEW BUSINESS
CUSTOMER 10$50,000$0($50,000)LOST BUSINESS
     
Totals$2,638,821$3,126,569$487,749GAINER

 

What I am trying to do now is create a visual summarizing the above table showing each CustomerStatus, a count of the Accounts in each status, and the Sum of the Revenue Variance of those accounts. Since I cannot use measures as the Rows in a Matrix visual, I assume it will require some DAX that I am in need of help with. The results should look as follows:

 

CustomerStatusCountofCustomerRevenueVariance
DECLINER                                     2($95,851)
GAINER                                     3$346,889
NEW BUSINESS                                     2$288,536
LOST BUSINESS                                     2($51,825)
FLAT                                     1$0
   
Totals                                   10$487,749

 

Thank you for any help on this. 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

@jeffw14 wheedle to create a dim table with all of status, then put them in the rows of visual 

Then create two measures

countofcustomer=countrows(filter(all(facttable[customer name]),[customer status] in values(dimtable[status])))

revenue var=calculate([current revenue],filter(all(facttable[customer name]),[customer status] in values(dimtable[status])))

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

@jeffw14 wheedle to create a dim table with all of status, then put them in the rows of visual 

Then create two measures

countofcustomer=countrows(filter(all(facttable[customer name]),[customer status] in values(dimtable[status])))

revenue var=calculate([current revenue],filter(all(facttable[customer name]),[customer status] in values(dimtable[status])))

Thanks, works great, exactly what I was looking for.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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