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
Below dax code first removes the date filter from the visual and calculates data based on other dates from measures. This returns the total amount from First to Last.
Board10bP&LAllTransactionAmountwithSignBudgetActualized =
VAR First = if(and(TODAY()>=[Board10aFirstDateSelected], TODAY()>= [Board10aLastDateSelected]),[Board10aLastDateSelected]+1,if(and(TODAY()<[Board10aFirstDateSelected], TODAY()< [Board10aLastDateSelected]),[Board10aFirstDateSelected],TODAY()+1))
VAR Last = CALCULATE(MAX( BudgetCalendar[Date] ),ALL( BudgetCalendar ))
RETURN
CALCULATE(
[AmountWithSign],
ALL(BudgetCalendar[Date]),DATESBETWEEN(BudgetCalendar[Date],First,Last)
)
The issue is that i want this total data still to be summarized by the date hierarchy (year, quarter, month) in the visual. I tried my hand at Summarizecolumns but i have not grasped that yet.
Thanks in advance for a kind help.
Solved! Go to Solution.
you may try:
Board10bP&LAllTransactionAmountwithSignBudgetActualized =
VAR First = if(and(TODAY()>=[Board10aFirstDateSelected], TODAY()>= [Board10aLastDateSelected]),[Board10aLastDateSelected]+1,if(and(TODAY()<[Board10aFirstDateSelected], TODAY()< [Board10aLastDateSelected]),[Board10aFirstDateSelected],TODAY()+1))
VAR Last = CALCULATE(MAX( BudgetCalendar[Date] ), ALL( BudgetCalendar[Date] ))
RETURN
CALCULATE(
[AmountWithSign],
ALL(BudgetCalendar[Date]),DATESBETWEEN(BudgetCalendar[Date],First,Last)
)
you may try:
Board10bP&LAllTransactionAmountwithSignBudgetActualized =
VAR First = if(and(TODAY()>=[Board10aFirstDateSelected], TODAY()>= [Board10aLastDateSelected]),[Board10aLastDateSelected]+1,if(and(TODAY()<[Board10aFirstDateSelected], TODAY()< [Board10aLastDateSelected]),[Board10aFirstDateSelected],TODAY()+1))
VAR Last = CALCULATE(MAX( BudgetCalendar[Date] ), ALL( BudgetCalendar[Date] ))
RETURN
CALCULATE(
[AmountWithSign],
ALL(BudgetCalendar[Date]),DATESBETWEEN(BudgetCalendar[Date],First,Last)
)
Thanks a lot. It worked! It was infront of me and i could never see it 😀
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 |
---|---|
52 | |
27 | |
24 | |
14 | |
9 |
User | Count |
---|---|
76 | |
58 | |
47 | |
17 | |
12 |