Forum Discussion
Transform qlik set analysis in dax language
Hi,
I need to trasform qlik set analysis in dax language. Set analysis is offers a way of defining a set (or group) of data values that is different from the normal set defined by the current selections.
The original formula is something like this:
count( {<[Field1={'P'},
[field2]={">9"}>} distinct [field3])
Should I use calculate?
Hi Giada_Togliatti ,
Try this:
Measure = CALCULATE(DISTINCTCOUNT('Table'[field3]),FILTER('Table','Table'[field2]>1&&'Table'[field1]="p"))Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- parry2k
Super User
Giada_Togliatti better post sample data and expected output to get the solution.
- Giada_Togliatti
Post Patron
parry2k I need to define a set (or group) of data values that is different from the normal set defined by the current selections and I should have as an output the result of a measure
field1 field2 p 1 q 2 If field1 is p and field2 is >1 then calculate count of something called field3
- V-lianl-msft
Community Support
Hi Giada_Togliatti ,
Try this:
Measure = CALCULATE(DISTINCTCOUNT('Table'[field3]),FILTER('Table','Table'[field2]>1&&'Table'[field1]="p"))Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ESANRRegular Visitor
Hi all,
I have the same question but a bit complex. If someone can help me please how to implement the same in POWER BI:Outgoing Products =
count( distinct
{<ImportID={$(v_Sequence_B)},
ProductID=P({ < ImportID={$(v_Sequence_B)}>}ProductID)>
*
< ProductID=P({< ImportID={$(v_Sequence_A)}>}ProductID)>} ProductID
)
I have also 2 filter objects in QlikView, Where v_sequence_A equals to the selected value of the first filtered object and v_sequence_B equals to the selected value of the second filtered object.
So, at the first part the query (ProductID=P({ < ImportID={$(v_Sequence_B)}>}ProductID)) must give me all ProductID that are equal to v_sequence_B and at the second part (ProductID=P({< ImportID={$(v_Sequence_A)}>}ProductID)) will give me all ProductID that are equal to v_sequence_A and finally (>*<) it will count me all ImportIDs that are in common respecting both situations.The difficult part of this query is that in power bi (at least as i know) is not possible to retrive the value selected by the filteres in oreder to use it as in another query.
Is there a way to get common values for a specific period by not considering the value selected from the filter objects?
Thans,
EHSAN