I am using PowerBI Desktop/Service as a Front-End and Analysis Services Multidimensional as Back-End. I want to create a complex calculated member but I have a problem in some part of the member.
For example, I need to have the MIN/MAX DATE of the TIME dimension which is used in the filter-element-slicer.
I have already tried some simply calculated members to start:
First One:
MAX
(
EXISTING
[Time].[DATE].Members,
[Time].MEMBER_KEY
)
Second One:
MAX
(
NONEMPTY
[Time].[DATE].Members,
[Time].MEMBER_KEY
)
Third One:
MAX
(
EXISTING
[Time].[YQM].[DATE].Members,
[Time].[YQM].MEMBER_KEY
)
Fourth One:
MAX
(
NONEMPTY
[Time].[YQM].[DATE].Members,
[Time].[YQM].MEMBER_KEY
)
I also have tried different by using a measure inside like this one:
MAX
(
(
[Time].[DATE].Members,
[Measures].[Sales Amount]
),
[Time].[DATE].Member_Key
)
All of them are showing the last DATE of TIME dimension and not the MAX selected in the filter-element-slider of PowerBI. Any ideas?
The strange thing here is that if I use the filter-element as simple-selection-drop-down and not as range-slicer, then, I am able to retrieve the current selected date with this code:
MAX
(
EXISTING
[Time].[YQM].CURRENTMEMBER,
[Time].[YQM].MEMBER_KEY
)
But when I switch to range-slicer the same code, returns zero(0)!
In addition, I have already done this using DAX in different Tabular Model and working properly, but it seems too hard for Multidimensional Model
Maybe the problem is due to the range?
[All]
of a previously-filtered cube and it might explains why you get 0. Can you try to run a Provider and show us the complete query ? – Midgett