The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Using Power BI Desktop April 2024 I have an issue when I use a measure as a value in matrix that contain additional values the matrix displys the values for the measure but is showing blanks for the other values. The measure that I am using is PO Next Weeks = VAR SelectedWeeks = SELECTEDVALUE('Weeks to include'[Weeks To Include]) VAR CurrentPeriodID = SELECTEDVALUE(Week_Site_Part_Periods[Period_ID]) VAR Result = CALCULATE( SUM('Purchase Orders'[PO]), ALL(Week_Site_Part_Periods[Period_ID]), Week_Site_Part_Periods[Period_ID] + 1 > CurrentPeriodID && Week_Site_Part_Periods[Period_ID] + 1 <= CurrentPeriodID + SelectedWeeks ) RETURN(IF(ISBLANK(Result), 0, Result))
@jisaenz I have a few questions: I assume the 'Purchase Orders'[PO] field contains a dollar amount? Why are you using the ALL function in the Result variable?
Those are the results in the matrix withouth the PO Next Weeks
this is the result whn I include the measure in the matrix
PO is qunatity with 0 decimals I am using all in the Result to allow me to use all Period_ID diffrent tahn the actual selected Period_ID
Still showing other coulmns in balnk and display the same values for PO Next Weeks 664227 with all shows the currect numbers
Hello @jisaenz,
Can you please try the following:
PO Next Weeks =
VAR SelectedWeeks = SELECTEDVALUE('Weeks to include'[Weeks To Include])
VAR CurrentPeriodID = SELECTEDVALUE(Week_Site_Part_Periods[Period_ID])
VAR Result = CALCULATE(
SUM('Purchase Orders'[PO]),
ALLEXCEPT(Week_Site_Part_Periods, Week_Site_Part_Periods[SomeOtherColumn]),
Week_Site_Part_Periods[Period_ID] + 1 > CurrentPeriodID &&
Week_Site_Part_Periods[Period_ID] + 1 <= CurrentPeriodID + SelectedWeeks
)
RETURN IF(ISBLANK(Result), 0, Result)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
86 | |
75 | |
55 | |
44 |
User | Count |
---|---|
136 | |
128 | |
78 | |
64 | |
63 |