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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Use constant value in measure

Hello folks,

 

I have a problem. I am going to try to explain as detailed as possible, but in case questions arise, please do not hesitate to ask.

 

I have got a visual which consists out of many measures. These measures calculate different collumns in different tables.

The values are dynamic by and I can filter them by different contexts.

I also need the totals. Those are supposed to be used as KPIs.

 

Screenshots below:

What it looks like at the momentWhat it looks like at the moment

 

In the visual it is supposed to show the total of all the lines (being filtered here). Right now it uses the previous total.

Example: 

[NAZ-SOLL] = [GLZ-STUNDEN] * [NAZ-TAGE]

 

Right now it calculates the sums. It is supposed to calculate the values on its own and THEN sum them up.

 

Can anyone help?

 

All the best,

c4ss10p314

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Not sure I follow, but perhaps: Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

Take a look at ISINSCOPE as well.

 

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

Thank you very much! I've already solved it by creating the measure as a virtual table, but that would probably work as well

 

 

I solved it as you say. with the virtual table creating there my constant value. Thank you.

But if I use few values I have to create multiple tables, right?

Any more optimal way?

Anonymous
Not applicable

It's apparently fairly simple.

We used SUMMARIZE to create a virtual table.

 

amitchandak
Super User
Super User

@Anonymous ,

For multiplication, we should sum(A*B), if not then sum(A)* Sum(B) need a common context

[NAZ-SOLL] =sumx(summarize(Dim,Dim[Common],"_1", [GLZ-STUNDEN],"_2", [NAZ-TAGE])[_1]*[_2])

 

Also, refer how to use context: https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Greg_Deckler
Super User
Super User

Not sure I follow, but perhaps: Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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