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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
tonyc
Frequent Visitor

DAX not running%

I have CY% in a measure. For some reason my CY% is a running %.

 

How do I make CY% is not a running %?

 

Here is DAX in CY% 

A WEIGHT CY =
CALCULATE(
    [A WEIGHT%] ,
    DATEADD(
        'Date'[Date],
        0,
        YEAR
    )
 
KeyCY%  KeyCY%
A12  A39
B13  B39
C14  C39
TOTAL39    

 

Thanks

7 REPLIES 7
rubayatyasmin
Super User
Super User

Hey, @tonyc 

 

use ALL function. For example:

 

A WEIGHT CY =
CALCULATE(
[A WEIGHT%],
FILTER(
ALL('Date'),
'Date'[Year] = MAX('Date'[Year])
)
)

 

this should remove filters if any. 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


No.. it didn't work.  I still get the running total.

Let's try a different approach.  I want to calculate the Result% column using a measure.

This is what I am expecting -

 

KeyZ1%Z2%Result %
A20%80%0.206793
B30%70%0.181431
C10%90%0.232156

 

A - 0.206793 = (20/100* 0.0038935516)+(80/100 * 0.2575179612)

B  - 0.181431 - (30/100* 0.0038935516)+(70/100 * 0.2575179612)

 

0.0038935516 and 0.2575179612 are generated from the measure and I want all calculations using these 2 constants variable

Type 1 WeightType 2 Weight
0.0038940.257518

 

Here is my measure for Result%

Result % =
 ( [Z1%] * [Type 1 Weight]) +  ( [Z2%] * Type 2 Weight )
 
Thank you.. let me know if you want more information.

can you provide demo file?


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


would it be okay to provide some measure instead of a file? sorry 

Im using table as my visualisations

demo data with requiremnts on would be perfect


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


 

I want 0.13% to be displayed in the Weight column with repetition.  thanks

tonyc_0-1699053599242.png

 

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.