Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi -
Trying to come up with a measure syntax to display Actuals and Forecast number in a matrix. Please assist with the correct DAX measure syntax. Currently, it's showing "$0" amounts for future months.
I'm using this:
Actuals Forecast:= if( VALUES('Calendar'[Month]) <= Month(Today()), [Labor Actuals], [Actuals/Forecast] )
Solved! Go to Solution.
Hi @miii ,
You need to redo your measure to something like this:
Actuals Forecast := IF ( HASONEVALUE ( 'Calendar'[Month] ); IF ( [Group Actuals Non-Blank] = 0; [Indirect Forecast]; [Indirect Actual] ); SUMX ( Calendar; IF ( [Group Actuals Non-Blank] = 0; [Indirect Forecast]; [Indirect Actual] ) ) )
Should work.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI have almost the same problem but i cant solve it any help
this is my data model where the base has the Unique value ID from the 3 data table
my problem I create a matix visual that has value for first 3 month I need to calculate the forcasting for other month where the forcasting calculation = SUM(previous months) / Count(previous months).
any help and thank you
Hi @akramayman ,
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêscheck inbox
Hello, I would suggest creating a Calculated column in the Query with the similar If Condiiton, so you can have a defined column for each, then you can eaither pivot them to see them as attribute or add the columns themselves.
I used the following and it's displaying the monthly forecast now but missing the total amount in the grid. It only returns January number in the total.
Actuals Forecast:= If ([Group Actuals Non-Blank] = 0, [Indirect Forecast],[Indirect Actual] )
Hi @miii ,
You need to redo your measure to something like this:
Actuals Forecast := IF ( HASONEVALUE ( 'Calendar'[Month] ); IF ( [Group Actuals Non-Blank] = 0; [Indirect Forecast]; [Indirect Actual] ); SUMX ( Calendar; IF ( [Group Actuals Non-Blank] = 0; [Indirect Forecast]; [Indirect Actual] ) ) )
Should work.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix
I have the same problem and i would to ask what is the
[Group Actuals Non-Blank]
also me forcasting calculate it should be the (sum of previous months / count of previous months)
Thank you so much MFelix !!! That worked. I'm new to DAX and PowerBI and finding this community incredibly helpful. Thanks all
Hi @miii ,
Without further details is difficult to give you a correct answer, butare tha Actuals and Actuals/forecast on different tables?
Do those tables have a relationship with the Calendar Table?
Can you share a sample of the data?
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi MFelix,
Yes -
Table1: Forecast Table
Date -> joins to calendar table on date
Division -> joins to a division bridge table
Indirect Labor Forecast -> Measure of forecast by Month
Table 2: Actuals
Date -> joins to calendar table on date
Division -> joins to a division bridge table
Indirect Labor Actuals -> Measure of actuals by Month
And here is a sample:
Hi @miii ,
You need to change your measure to:
Actuals Forecast = IF ( SELECTEDVALUE ( 'Calendar'[Month] ) <= MONTH ( TODAY () ), [Labor Actuals], [Actuals/Forecast] )
should work fine
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUnfortunately, "SELECTEDVALUE' syntax is not available in PowerBI version we are using.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |