cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
atul9063 Member
Member

Not able to add Product Category Name in legend field in Line Chart

Hi,

 

I want to display Total Profit and Total Revenue both in Line chart for ProductCategory Name as legend. But i m not able to add it chart ProductCategory name in legend field.

 

image.png

 

Thanks

6 REPLIES 6
Super User
Super User

Re: MoM% Measure Showing 0.00%

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

atul9063 Member
Member

Re: MoM% Measure Showing 0.00%

@Greg_DecklerCan you share MoM% change formula in DAX without using time intellugence function?

Super User
Super User

Re: MoM% Measure Showing 0.00%

Should be something along the lines of:

 

TITHW_%ChangeYoY = 
VAR __MaxYear = MAX('Years'[Year])
VAR __MaxMonth = MAX('Months'[MonthSort])
VAR __TmpTable = CALCULATETABLE('TheHardWay','Years'[Year]=__MaxYear,All('Months'[Month]))
VAR __currentMonth = SUMX(FILTER(__TmpTable,[MonthSort] = __MaxMonth),[Value])
VAR __previousMonth = SUMX(FILTER(__TmpTable,[[MonthSort] = __MaxMonth - 1),[Value])
RETURN DIVIDE(__currentMonth - __previousMonth,__previousMonth,0)

 


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Highlighted
Community Support Team
Community Support Team

Re: MoM% Measure Showing 0.00%

hi, @atul9063

There is nothing wrong with your formula. since you need to calculate MoM%, you need to drag the field 'Calender'[Date]

from Calender table into visual, this will calculate with Time Intelligence.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
atul9063 Member
Member

Re: MoM% Measure Showing 0.00%

ame tI have done thing but its not working.Anyway now im calculating in SQL

Community Support Team
Community Support Team

Re: MoM% Measure Showing 0.00%

hi, @atul9063

You could just drag the field 'Calender'[Date] into Columns value of Matrix like below:

10.JPG

 

Best Regards,

Lin

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 147 members 1,536 guests
Please welcome our newest community members: