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
Anonymous
Not applicable

Need help with Formula

Hi,

I need help with formula for the below data, I want to sum up the values of only projects in the column Data.

So my result should be like column or measure=5933

 

 

Datavalue
AP Vouchers Entered41194
AR Invoices165812
Cash Mgt Entries2528
Projects352
Customer Billing49159
Expense Reports32993
Journals Posted48055
PO Count1335
Project Activities85049
Projects5581

 

Thanks,

Ravi

3 ACCEPTED SOLUTIONS
Phil_Seamark
Employee
Employee

Hi @Anonymous

 

You could add the following Measure

 

New Measure = CALCULATE(
				SUM('Table'[value]),
					'Table'[Data]="Projects"
					)

 or add a column like this

 

New Column = IF('Table'[Data]="Projects",'Table'[value],BLANK())

I reckon the measure is the better way to go 🙂


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

Anonymous
Not applicable

Image1.PNGImage2.PNG

 

Phil I need one more help, I am trying to create a line and stacked chart with the below data and as shown in the Image1 I have created the stacked part, But I want the values of Login User as the line and the Login user should be excluded from the stacked columns as shown in Image2, how to acheive this?

 

DatavalueMonth
AP Vouchers Entered41194Oct
AR Invoices165812Oct
Cash Mgt Entries2528Oct
Contracts352Oct
Customer Billing49159Oct
Expense Reports32993Oct
Journals Posted48055Oct
PO Count1335Oct
Project Activities85049Oct
Projects5581Oct
Login Users46507Oct
AP Vouchers Entered37648Nov
AR Invoices144398Nov
Cash Mgt Entries2554Nov
Contracts382Nov
Customer Billing36714Nov
Expense Reports27417Nov
Journals Posted43999Nov
PO Count858Nov
Project Activities87161Nov
Projects5072Nov
Login Users42269Nov

View solution in original post

Please try this measure and add it to the line values of your visual.

 

 

 

Logged in Users = CALCULATE(
		SUM('Table'[value]),
		FILTER(
			ALLEXCEPT('Table','Table'[Month]),
			'Table'[Data]="Login Users")
			)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

5 REPLIES 5
Phil_Seamark
Employee
Employee

Hi @Anonymous

 

You could add the following Measure

 

New Measure = CALCULATE(
				SUM('Table'[value]),
					'Table'[Data]="Projects"
					)

 or add a column like this

 

New Column = IF('Table'[Data]="Projects",'Table'[value],BLANK())

I reckon the measure is the better way to go 🙂


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Thanks Phil, I will go with the measure:)

 

Regards,

Ravi

Anonymous
Not applicable

Image1.PNGImage2.PNG

 

Phil I need one more help, I am trying to create a line and stacked chart with the below data and as shown in the Image1 I have created the stacked part, But I want the values of Login User as the line and the Login user should be excluded from the stacked columns as shown in Image2, how to acheive this?

 

DatavalueMonth
AP Vouchers Entered41194Oct
AR Invoices165812Oct
Cash Mgt Entries2528Oct
Contracts352Oct
Customer Billing49159Oct
Expense Reports32993Oct
Journals Posted48055Oct
PO Count1335Oct
Project Activities85049Oct
Projects5581Oct
Login Users46507Oct
AP Vouchers Entered37648Nov
AR Invoices144398Nov
Cash Mgt Entries2554Nov
Contracts382Nov
Customer Billing36714Nov
Expense Reports27417Nov
Journals Posted43999Nov
PO Count858Nov
Project Activities87161Nov
Projects5072Nov
Login Users42269Nov

Please try this measure and add it to the line values of your visual.

 

 

 

Logged in Users = CALCULATE(
		SUM('Table'[value]),
		FILTER(
			ALLEXCEPT('Table','Table'[Month]),
			'Table'[Data]="Login Users")
			)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Thanks Phil, that work exceptionally well!

After using the formula in the line value, I filtered out the "Login Users" from the Visual level filter and the o/p is as shownImage3.PNG

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.