Forum Discussion
VAR with multiple return values
Hai Jonjon_99
Can you please elaborate your question and what you are trying to achive and the expected output you are looking, if its possible please share pbix file using dummy data
- Jonjon_993 years agoHelper I
hi Alan, thanks for checking. i want to have a table calculated by year.
it works in monthly but not in yearly
- Jonjon_993 years agoHelper I
result should be 100% aswell in yearly summary.
- Jonjon_993 years agoHelper I
and this is the data.
https://drive.google.com/drive/folders/1i7N8YWWwMvZHEU08rxWIRDBsaC_kz6sg
- AlanP5143 years agoPost Patron
Hi Jonjon_99
Thank for sharing , recieved the data, now please explain your expected output in detailed way ,
What you are trying to achive , i am not geeting by reading your previous- Jonjon_993 years agoHelper I
Hi Alan, thanks again for your reply.
i have sales type filter, for my units,sales and total percenatage of units and sales by column.
right now, it is working in my first matrix if i want to calculate the pecnetage of column by monthly summary cause i have this DAX which is specific only for monthly summary.%Total Units =VAR CurrentMonth = MAX('Date'[MonthName])RETURNDIVIDE(SUM(SalesFact[Units]),CALCULATE(SUM(SalesFact[Units]),FILTER(ALLSELECTED(SalesFact),RELATED('Date'[MonthName])=CurrentMonth)))now, i want also this filter to work with my yearly matrix. as you can see, calculation is incorrect because the total is >100%.
hope it is clearer now. sorry that my english is not good. haha! apreciate your time and help!
https://drive.google.com/drive/folders/1i7N8YWWwMvZHEU08rxWIRDBsaC_kz6sg?usp=sharing