Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Giada_Togliatti
Post Patron
Post Patron

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?

1 ACCEPTED SOLUTION

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.

View solution in original post

4 REPLIES 4
ESANR
Regular 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

parry2k
Super User
Super User

@Giada_Togliatti better post sample data and expected output to get the solution.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@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

field1field2
p1
q2

 

If field1 is p and field2 is >1 then calculate  count of something called field3

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.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.