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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ndna74
Frequent Visitor

Format table to enable value comparison using DAX

Month

NameBalance
AugustLoan A1000
AugustLoan B2000
AugustLoan C2500
AugustLoan D1500
AugustLoan E3000
SeptemberLoan A1100
SeptemberLoan B2000
SeptemberLoan C2600
SeptemberLoan D1600
SeptemberLoan E3000

 

I receive external monthly data and I add it to a table as above. I use a columnar approach rather than matrix. 

 

Can I use DAX to compare the change in value at loan level and in total? The data will build as the year progresses.

 

Many thanks

Nick

 

1 ACCEPTED SOLUTION

Hi @ndna74,

 

>>Could you also show me how to show the change in value each month? For example, how to show that loan A has increased by 100 between August and September.

 

For your requirement, I merge the month and name columns to create a detail name column.

Formula: Table = SELECTCOLUMNS(Sheet2,"Name",CONCATENATE([Month]&"-",[Name]),"Balance",[Balance])

 

Capture.PNG

 

Create a visual with new columns:

 

Capture2.PNG

 

Click on "..." button to modify the sort column:

 

Capture3.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @ndna74,

 

Based on my understanding, you want to get the result of current month balance/ total balance, right?

If it is a case, you can follow below steps to achieve your requirement.

 

Table:

Capture.PNG

 

Measure:

Percent =
var currtemp= LASTNONBLANK(Sheet5[Month],[Month])
return
MAX(Sheet5[Balance])/ SUMX(FILTER(ALL(Sheet5),Sheet5[Month]=currtemp),[Balance])

 

Format the value to "%":

Capture3.PNG

 

Create the visual:

Capture2.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks that's really helpful.

 

Could you also show me how to show the change in value each month? For example, how to show that loan A has increased by 100 between August and September.

 

Regards

Nick

Hi @ndna74,

 

>>Could you also show me how to show the change in value each month? For example, how to show that loan A has increased by 100 between August and September.

 

For your requirement, I merge the month and name columns to create a detail name column.

Formula: Table = SELECTCOLUMNS(Sheet2,"Name",CONCATENATE([Month]&"-",[Name]),"Balance",[Balance])

 

Capture.PNG

 

Create a visual with new columns:

 

Capture2.PNG

 

Click on "..." button to modify the sort column:

 

Capture3.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks very much

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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