The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello community,
Is there any way to set up a relationship between a measure and a Column of a table?
So what I thought is the following:
1) I created a new table with the GENERATESERIES() Function. In this function I just put in a span of integers (For example 1 until 10)
2) I created 10 measures for every integer value.
3) Usually I just can create relationships between tables. But now I would like to have a 2-Tuple.
4) I considered to do something like this / the idea: { (1, measure_result_1), (2, measure_result_2), ..., (10, measure_result_10) }
5) Result should be a visualisation with 1 until 10 on x-axis and the corresponding results on the y-axis.
Thanks in advance
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below, and I hope the below can provide some ideas on how to create a solution for your dataset.
Expected result measure: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis table'[Value] ) = 1, CALCULATE ( SUM ( Data[Quantity] ), Data[Category] = "Ca01" ),
SELECTEDVALUE ( 'Axis table'[Value] ) = 2, CALCULATE ( SUM ( Data[Quantity] ), Data[Category] = "Ca03" ),
SELECTEDVALUE ( 'Axis table'[Value] ) = 3, CALCULATE ( SUM ( Data[Quantity] ), Data[Category] = "Ca08" )
)
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below, and I hope the below can provide some ideas on how to create a solution for your dataset.
Expected result measure: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis table'[Value] ) = 1, CALCULATE ( SUM ( Data[Quantity] ), Data[Category] = "Ca01" ),
SELECTEDVALUE ( 'Axis table'[Value] ) = 2, CALCULATE ( SUM ( Data[Quantity] ), Data[Category] = "Ca03" ),
SELECTEDVALUE ( 'Axis table'[Value] ) = 3, CALCULATE ( SUM ( Data[Quantity] ), Data[Category] = "Ca08" )
)
@Shifty1993 Maybe:
Measure =
SWITCH('Table'[Index],
1, [measure1],
2, [measure2],
3, [measure3],
4, [measure4],
...
)
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |