cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vgarlap
Post Patron
Post Patron

Need help : DAX Measure - Expected output vs Actual output

Hi Community, 

 

I need some help to resolve an issue i have been facing or trying to understand and fix it.  I have columns like MonthYear , Forecast 2021(% value) , Forecast 2021 Nr(numerator) , Total Count of rows ( Denominator) . Month year is a calculated column created using some format function from date .  Rest of the 3 are measures created . 

 

I have also added DAX codes for reference : 

 

Forecast 2021 Nr = CALCULATE(COUNT('Mainframe Turndown'[PROCESSNAME]),FILTER('Mainframe Turndown','Mainframe Turndown'[Turndown PeriodForecast]="5/1/2021"))
 
Total Count of rows = CALCULATE(COUNT('Mainframe Turndown'[PROCESSNAME]),FILTER('Mainframe Turndown',NOT(ISBLANK('Mainframe Turndown'[PROCESSNAME]))))
 
Forecast 2021 = [Forecast 2021 Nr]/[Total Count of rows]

 

Actual Output : 

 

Capture.PNG

 

My expectation is for May 2021 , Numerator value should be 391 and should be divided by 28852(total count of rows) . However, Numerator and Denominator are same (391) and when are divided , its showing 100% . I am expecting it to be 

 

-  391/28852  = 1.36% 

 

I am not sure how to change the Denominator part to work as i am expecting.  Below shown is the expected ouput . 

 

Expected output : 

 

Capture.PNG

 

Please Assist !! 

1 ACCEPTED SOLUTION

Hey Vijay,

 

This is awesome . It is working as expected . 🙂 

 

However, i would like to understand how you have re written the DAX measure with such ease in less time . could you please guide me on how we can measures like that ?

View solution in original post

3 REPLIES 3
VijayP
Super User I
Super User I

@vgarlap I suggest to create a Datedim

use this function

 1 .CALCULATE(
       COUNT('Mainframe Turndown'[PROCESSNAME]),
       FILTER(ALLSELECTED(DateDim), DateDim[Date]="Desired Date")

 

2. Calculate(COUNT('Mainframe Turndown'[PROCESSNAME]),
    All(FACT Table))

3. DIVIDE(First Measure, Second Measure,0)
Please do let me know if it works!

       




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Hey Vijay,

 

This is awesome . It is working as expected . 🙂 

 

However, i would like to understand how you have re written the DAX measure with such ease in less time . could you please guide me on how we can measures like that ?

View solution in original post

@vgarlap Practice with Logic and understanding Data and Final Outcome!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.