Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, guys!
Need some help.
Try to create some measures for calculation in table, but got some errors with hierchy.
I googled a little and found this article:
https://www.daxpatterns.com/hierarchies/
I tried to repeat The Product Level measure, but it didn`t work correctly.
Look,
What did i wrong?
Link to pbix: https://drive.google.com/file/d/18RSdNrmt79EE36iY_i75RfjiyMgjh9Tu/view?usp=sharing
Solved! Go to Solution.
@KonstantinD
You must change column1 and 2 in the variables, try the following measure:
Product Level 2 =
VAR IsProductInScope = ISINSCOPE ( 'Table'[Column2] )
VAR IsSubcatInScope = ISINSCOPE ( 'Table'[Column1] )
VAR Result =
SWITCH (
TRUE (),
IsProductInScope, "Product",
IsSubcatInScope, "Subcategory",
"No filter"
)
RETURN
Result
___________________
If my answer was helpful, click OK as the solution to help other members find it useful
Click the Thumbs-Up icon if you like this answer 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
You are welcome,
kindly accept the reply as the solution if it is helpful for you,
Thanks
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@KonstantinD
You must change column1 and 2 in the variables, try the following measure:
Product Level 2 =
VAR IsProductInScope = ISINSCOPE ( 'Table'[Column2] )
VAR IsSubcatInScope = ISINSCOPE ( 'Table'[Column1] )
VAR Result =
SWITCH (
TRUE (),
IsProductInScope, "Product",
IsSubcatInScope, "Subcategory",
"No filter"
)
RETURN
Result
___________________
If my answer was helpful, click OK as the solution to help other members find it useful
Click the Thumbs-Up icon if you like this answer 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
94 | |
86 | |
78 | |
69 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |