Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
New to Power BI desktop. Using data connection to Analysis Server Models in PBI Desktop (May 2019).
I want to create 2 measures COUNT1 and COUNT2 based on data below. I tried using the quick measures and could not figure out. Any input? I see that certain features such as calculated column are disabled in Power BI desktop when using Analysis server models.
TIA!
Sample data
Count of categories starting with @character@ = COUNT1 = 6
Count of categories named F123 = COUNT2 = 35
Solved! Go to Solution.
Hi @rrgeneral ,
If you are using Live Connection mode to connect to Analysis Service, you could not use Containstring() function to create measure.
Try to create measures like this:
Count 1 =
SUMX (
FILTER ( 'Sheet1', SEARCH ( "@", 'Sheet1'[Category],, 0 ) > 0 ),
[Count]
)
Count 2 =
CALCULATE ( SUM ( Sheet1[Count] ), 'Sheet1'[Category] = "F123" )
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rrgeneral ,
If you are using Live Connection mode to connect to Analysis Service, you could not use Containstring() function to create measure.
Try to create measures like this:
Count 1 =
SUMX (
FILTER ( 'Sheet1', SEARCH ( "@", 'Sheet1'[Category],, 0 ) > 0 ),
[Count]
)
Count 2 =
CALCULATE ( SUM ( Sheet1[Count] ), 'Sheet1'[Category] = "F123" )
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @rrgeneral
Please try the below measures.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
@rrgeneral , You can have two measure to need to do dynamic segmentation
Calculate([Count], Filter(Table, Table[Category] = "F123"))
or
Calculate([Count], Filter(Table, Search("@",Table[Category],,0)>0))
Refer for Dynaminc segmentation
https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
https://youtu.be/CuczXPj0N-k
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |