cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ivancespedesl Helper I
Helper I

Changing column graph displayed value and getting measures out of it

Hi,

I want to get a "macro-graph" where I have all the variables inside it. I did it creating a new table ('Value') following this formula:

 

Measure =
IF(HASONEVALUE( 'Value'[Value]),
SWITCH(VALUES('Value'[Value]),
"Ingresos_Mes", AVERAGE('Clientes Mac'[Ingresos_Mes]),
"Sal_Cons_TC", SUM( 'Clientes Mac'[Sal_Cons_TC] ),
"Sal_Cons_CC", SUM( 'Clientes Mac'[Sal_Cons_CC])
), "Choose a value")


However, now I want to make measures out of this measure such as MoM%, Average over time, etc. Mostly time intelligence measures. The measure really doesnt understand time, or maybe my formula is wrong. For example, MoM% is the following:

MoM% =
IF(
    ISFILTERED('Clientes Mac'[Date].[Month]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_MONTH = CALCULATE([Measure], DATEADD('Clientes Mac'[Date].[Date], -1, MONTH))
    RETURN
        DIVIDE([Measure] - __PREV_MONTH, __PREV_MONTH)
)

Any suggestions are accepted.
 
 
Thanks in advance,
 
IC
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Changing column graph displayed value and getting measures out of it

hi, @ivancespedesl 

The problem is that there is no row context in this visual. So it could understand the time variables.

So .could you please share a simple sample data and your expected output. so that I could give you a further help.

 

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.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Changing column graph displayed value and getting measures out of it

hi, @ivancespedesl 

Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

If possible, please share a simple sample pbix file.

 

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.
Highlighted
ivancespedesl Helper I
Helper I

Re: Changing column graph displayed value and getting measures out of it

Hi,

 

Using this code I was able to create a variable that gives me this output:

image.png

image.png

This allows me to get the totals and graphs depending on the selection as I want to be presented:

image.png

 

However, Im having problem making measures as Average, MoM%, etc. I think the problem is that it does not understand the time variables, therefore, does not calculate properly.

 

What I want to do is to create measures as Average, MoM% that work for every variable selected so I want to do this calculations specifically to the variable Measure.

 

Any other info you need, Im at your service.

Community Support
Community Support

Re: Changing column graph displayed value and getting measures out of it

hi, @ivancespedesl 

The problem is that there is no row context in this visual. So it could understand the time variables.

So .could you please share a simple sample data and your expected output. so that I could give you a further help.

 

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.

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors